[R] indexing question
Bunny, lautloscrew.com
bunny at lautloscrew.com
Tue Jan 13 10:26:08 CET 2009
Hi all,
i have a pretty easy indexing question, at least i believe so. The
main reason i post it here, is that brackets and $ are hard to google.
How do I index correctly, if i just want to display the whole dataset
conditioned on the fact that some particular column equals one.
I know i can do something like: data$somecolumn[data$particularcol
==1] . That will show all "some column" values where the particular
column is 1.
Unfortunately something like : data[data$particularcol ==1] does not
work to get the whole matrix.
is there some easy way except the % in % stuff ?
Thx in advance
More information about the R-help
mailing list