I would like to subset by dataframe by matching all rows that have any value
from a list of values.  I can get it to work if I have exactly one value,
I'm not
sure how to do it with a list of values though.

This works and gives me exactly one line:
my.df[ which( mydf$IDX==17)), ]

I would like to do something like this:
my.df[ which( mydf$IDX==c(17, 42), ]

Obviously that won't work, but I hope the meaning is clear.
What's the right way to express this?

        [[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