[R] plot/lm/abline

Mikkel Grum mi2kelgrum at yahoo.com
Thu Jun 2 15:40:09 CEST 2005


Hi Mathias,

Try

abline(lm(z2 ~ z1))

Mikkel

......................................

Hi,

when I run

> plot.default(z1, z2, xlab = "x", ylab = "y", main =
"xxxx", pch = "+")
> abline(lm(z1 ~ z2))

then the plot is plotted perfectly (scatterplot),
however, the lm()
function doesnt appear on the plot. What could be
wrong?

(Yesterday it worked perfectly, with the lm() line.)

Running R 2 on OS X.

Mathias Hunskår Furevik
Norway




More information about the R-help mailing list