Skip to content
Prev 11795 / 398506 Next

select cases from a data.frame or matrix

Would subset() do what you want?  for example,

maleOver40 <- subset(select.data.frame,  subset=(sex=="m" | sex== "M") & age > 40)

Rashid Nassar
On Wed, 20 Jun 2001, Till Baumgaertel wrote:

            
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._