Re: [R] problem with abline

2010-10-06 Thread Dennis Murphy
Hi: See below. On Wed, Oct 6, 2010 at 2:56 PM, Gerard Smits wrote: > Hi All, > > I am running a scatter plot and trying to add a best fit line. I use an > abline function, but get no line drawn over the points. I also get no > error. I arm using V 2.10.0 on Windows 7. > > Here is my code, in

Re: [R] problem with abline

2010-10-06 Thread Gerard Smits
Hi David, Just changed to the standard plot from xyplot and it worked fine. I'll check out panel.lmline. Thanks for your help. Gerard On Oct 6, 2010, at 3:27 PM, David Winsemius wrote: > > On Oct 6, 2010, at 5:56 PM, Gerard Smits wrote: > >> Hi All, >> >> I am running a scatter plot and

Re: [R] problem with abline

2010-10-06 Thread David Winsemius
On Oct 6, 2010, at 5:56 PM, Gerard Smits wrote: Hi All, I am running a scatter plot and trying to add a best fit line. I use an abline function, but get no line drawn over the points. xyplot is Lattice abline is base graphics I also get no error. I arm using V 2.10.0 on Windows 7. He

[R] problem with abline

2010-10-06 Thread Gerard Smits
Hi All, I am running a scatter plot and trying to add a best fit line. I use an abline function, but get no line drawn over the points. I also get no error. I arm using V 2.10.0 on Windows 7. Here is my code, including the SAS transport file import: require (foreign) require (chron) require

Re: [R] problem with abline and lines

2010-03-22 Thread Ted Harding
On 22-Mar-10 11:13:39, Martin Ivanov wrote: > Dear R users, > I need to plot to perpendicular straight lines. However, although > I set the coefficients so that the lines are perpendicular, they > do not look to be so in the plot. Here is a minimal working example: > > plot(x=c(-1, 1), y=c(-1, 1)

Re: [R] problem with abline and lines

2010-03-22 Thread Miguel Porto
Hi! You forgot to invert the slope: a perpendicular of 1/sqrt(2) should be -sqrt(2). Also, you should add asp=1 in the plot command to lock the aspect ratio, otherwise the scale of both X and Y may be different according to the size of the window: plot(x=c(-1, 1), y=c(-1, 1),asp=1); abline(a=0, b=

[R] problem with abline and lines

2010-03-22 Thread Martin Ivanov
Dear R users, I need to plot to perpendicular straight lines. However, although I set the coefficients so that the lines are perpendicular, they do not look to be so in the plot. Here is a minimal working example: plot(x=c(-1, 1), y=c(-1, 1)); abline(a=0, b=1/sqrt(2)); abline(a=0, b=-1/sqrt(2

[R] problem with 'abline' in a regression with repeated measures

2009-03-12 Thread Marc Carpentier
Hi everybody. I'm just learning to use R. I've got a strange problem and I couldn't find any answer to my problem. So here am I. I want to visualize a model of regression on repeated measures : 5 measures (y) by x-value (lx for log10(x) ; lxf colonn is for as.factor) ; 5 x-values. I fail to use