Hello, I figured out that the code should be
boyline<-lm(body_weight ~ body_length, data=subset (together,,sex=="boy")) However, the "" could be omitted if the field name happened to be numeric, such as 1, 2, or 3. Please kindly explain why the "" could be omitted for numbers. Thanks again. Elaine On Tue, Jan 8, 2013 at 8:40 AM, Elaine Kuo <elaine.kuo...@gmail.com> wrote: > boyline<-lm(body_weight ~ body_length, data=together, > subset(together,sex=="boy")) ______________________________________________ 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.