From: SNV Krishna <krishna_at_primps.com.sg>

Date: Wed, 06 Apr 2011 16:45:57 +0800

R-help_at_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. Received on Wed 06 Apr 2011 - 08:51:58 GMT

Date: Wed, 06 Apr 2011 16:45:57 +0800

> subset(df, x == c('a','b')) # this command did not return all rows where x

is equal to a or b

> df[df$x %in% c('a','b'),] # subsetting using subscripts returned all rows

[[alternative HTML version deleted]]

R-help_at_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. Received on Wed 06 Apr 2011 - 08:51:58 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Wed 06 Apr 2011 - 10:20:27 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*