[R] plot/lm/abline

Sarah Goslee sarah.goslee at gmail.com
Thu Jun 2 15:31:32 CEST 2005


On 6/2/05, Mathias Hunskår Furevik <mathias.furevik at gmail.com> wrote:
> Hi,
> 
> when I run
> 
> > plot.default(z1, z2, xlab = "x", ylab = "y", main = "xxxx", pch = "+")
> > abline(lm(z1 ~ z2))

I think you have the independent and dependent variables switched:

abline(lm(z2 ~ z1))

Sarah
-- 
Sarah Goslee
http://www.stringpage.com




More information about the R-help mailing list