[R] extracting from a data.frame
dax42
Dax42 at web.de
Fri Jan 28 19:26:14 CET 2005
Hi,
I am sorry for this simple question, but... How do I extract something
from a data.frame?
The following is my Problem:
I have got a dataframe "a" with various columns. One of those columns
is called V3 and contains elements of the following levels:
> levels(a$V3)
[1] "C" "CA" "CB" "CD" "CD1" "CD2" "CE" "CE1" "CE2" "CE3" "CG"
[12] "CG1" "CG2" "CH2" "CZ" "CZ2" "CZ3" "N" "ND1" "ND2" "NE" "NE1"
[23] "NE2" "NH1" "NH2" "NZ" "O" "OD1" "OD2" "OE1" "OE2" "OG" "OG1"
[34] "OH" "OXT" "SD" "SG"
Now I would like to get all rows of a, that have the value "O" in V3.
I tried a lot of different combinations of [... but I couldn't make it.
Any ideas?
Thanks a lot!
Dax.
More information about the R-help
mailing list