[R] selecting rows for inclusion in lm

Vladimir Eremeev wl at eimb.ru
Thu Jan 18 09:51:54 CET 2007


> Why not use the subset option?  Something like:
> 
> lm(diff ~ Age + Race, data=data, subset=data$Meno=="PRE")

> should do the trick, and be much easier to read!

"data$" could be omitted, simply 
lm(diff ~ Age + Race, data=data, subset=Meno=="PRE")



More information about the R-help mailing list