On Jan 7, 2013, at 5:02 PM, Elaine Kuo wrote:
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.
The interpreter parses atoms composed only of [digits, "-", "."] ,
i.e. "numeric", differently than it parses atoms with leading
[alphas]. Please study the introductory material more thoroughly where
this is all explained and illustrated. And do provide minimal
reproducible examples. That might be especially important here , since
failing to include the quotes could be very prone to error if the
underlying object is a factor variable.
--
David
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"))
______________________________________________
David Winsemius, MD
Alameda, CA, USA
______________________________________________
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.