Even when choosing a value from the first few rows, it doesn't work. okay
here it goes:

> rearranged[1:10, 1:5]
           x        y band1 VSCAT.001 soiltype
1  -124.3949 40.42468    NA        NA       CD
2  -124.3463 40.27358    NA        NA       CD
3  -124.3357 40.25226    NA        NA       CD
4  -124.3663 40.40241    NA        NA       CD
5  -124.3674 40.49810    NA        NA       CD
6  -124.3083 40.24744    NA       464     <NA>
7  -124.3017 40.31295    NA        NA        D
8  -124.3375 40.47557    NA       464     <NA>
9  -124.2511 40.11697     1        NA     <NA>
10 -124.2532 40.12640     1        NA     <NA>

> query<- rearranged$y== 40.42468
> rearranged[query,]
[1] x         y         band1     VSCAT.001 soiltype
<0 rows> (or 0-length row.names)

hmm it seems to be working for the whole number...

query<- rearranged$ VSCAT.001== 464
except it's  a huge table (I guess I have to get rid of all rows with NA). I
tried using the %~% but R doesn't recognize it.  So maybe it has to do with
the rounding errors?


On Mon, Jul 27, 2009 at 2:56 PM, Steve Lianoglou <
mailinglist.honey...@gmail.com> wrote:

>  no luck, it's okay, i will figure it out!  i might isolate and recombine
>> all the columns, maybe that will work.  thanks for the help!
>>
>
> No, wait .. no luck in being able to select out rows from your data.frame
> using values you see somewhere in the top 10 rows?
>
> Can you just paste in some key lines in your session so we can see?
>
> For instance, let's assume your data is in my.data, I'd like to see the
> results for:
>
> # Replace the column values (1:5) with other columns
> # you want to use for selection
> R> my.data[1:10,1:5]
>
> # Now show me your query and it's result that returns
> # a <0-row> data.frame, for example using a value
> # that appears in that column from the previous query
> R> my.data[my.data[,1] == 'something',]
> <0 rows> (or 0-length row.names)
>
> There should be a simple answer to what's going wrong here.
>
> -steve
>
> --
> Steve Lianoglou
>
> Graduate Student: Computational Systems Biology
>  |  Memorial Sloan-Kettering Cancer Center
>  |  Weill Medical College of Cornell University
> Contact Info: 
> http://cbio.mskcc.org/~lianos/contact<http://cbio.mskcc.org/%7Elianos/contact>
>
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to