Hi,
if it should be "lines" so you can do that
xy.lm <- lm(y~x)
lines(x, xy.lm$coeff[1] + x*xy.lm$coeff[2], col="blue", lwd=3)
Regards
ep
--
View this message in context:
http://r.789695.n4.nabble.com/add-a-linear-regression-line-to-the-plot-tp3215455p3216099.ht
Try this
x <- seq(0,15,0.01)
plot(x+1, dexp(x, 0.2), c(0,15), c(0,0.8),type="l", ylab="f(x)")
lines(x+1, dexp(x, 0.8))
grid()
abline(v=1, col="lightgray", lty="dotted",)
Best
ep
--
View this message in context:
http://r.789695.n4.nabble.com/Expo
You can use "Save history..." from the R-Console.
Greetings ep
--
View this message in context:
http://r.789695.n4.nabble.com/Is-there-a-function-to-save-the-content-in-R-console-to-some-file-tp3419138p3419499.html
Sent from the R help mailing list archive at
3 matches
Mail list logo