Re: [R] plot xaxp issue

2013-01-08 Thread David Winsemius
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 th

Re: [R] plot xaxp issue

2013-01-07 Thread PIKAL Petr
com] > Sent: Tuesday, January 08, 2013 2:03 AM > To: PIKAL Petr > Cc: r-help@r-project.org > Subject: Re: [R] plot xaxp issue > > Hello, > > I figured out that the code should be > > boyline<-lm(body_weight ~ body_length, data=subset > (together,,sex=="boy&q

Re: [R] plot xaxp issue

2013-01-07 Thread Elaine Kuo
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. Ela

Re: [R] plot xaxp issue

2013-01-07 Thread Elaine Kuo
Hello, Thanks again. But something wrong with the subset after lm > > It is not about drawing plot many times but coding points or graphic objects > by some factor. In your case sex. > > Instead of > boyline<-lm(body_weight ~ body_length, boy) > > use collective data frame together and subset on

Re: [R] plot xaxp issue

2013-01-07 Thread PIKAL Petr
Hi > -Original Message- > From: Elaine Kuo [mailto:elaine.kuo...@gmail.com] > Sent: Monday, January 07, 2013 1:45 PM > To: PIKAL Petr > Cc: r-help@r-project.org > Subject: Re: [R] plot xaxp issue > > Thank you Petr, the code is wonderful. > > One more qu

Re: [R] plot xaxp issue

2013-01-07 Thread Elaine Kuo
-Original Message----- >>> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- >>> project.org] On Behalf Of Elaine Kuo >>> Sent: Monday, January 07, 2013 9:27 AM >>> To: r-help@r-project.org >>> Subject: [R] plot xaxp issue >>> >>

Re: [R] plot xaxp issue

2013-01-07 Thread Elaine Kuo
t; col=c("firebrick3","saddlebrown")[as.numeric(together$sex)], ) > > Regards > Petr > > >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- >> project.org] On Behalf Of Elaine Kuo >> Sent: Monday, January 0

Re: [R] plot xaxp issue

2013-01-07 Thread PIKAL Petr
, , col=c("firebrick3","saddlebrown")[as.numeric(together$sex)], ) Regards Petr > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Elaine Kuo > Sent: Monday, January 07, 2013 9:27 AM > To: r

[R] plot xaxp issue

2013-01-07 Thread Elaine Kuo
Hello, I have data of Body length and Body weight of 8 boys and 7 girls. I want to draw the plot of Body length (for X) and Body weight (for Y) based on sex. Then the two plots want to be overlapped for comparison. I used the code below but found the unit length of X axis of boy and girl plot ar