[R] plot xaxp issue

David Winsemius dwinsemius at comcast.net
Tue Jan 8 17:07:04 CET 2013


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.tw at gmail.com>  
> wrote:
>> boyline<-lm(body_weight ~ body_length, data=together,  
>> subset(together,sex=="boy"))
>
> ______________________________________________


David Winsemius, MD
Alameda, CA, USA




More information about the R-help mailing list