Add regression line (and goodness-of-fit stats) to scatterplot

ぃ、小莉子 提交于 2019-12-01 14:41:09
lukeA

By default, plot regards the 1st param as x and the 2nd as y. Try

plot(y = subdata2$PeakToGone, x = subdata2$NO3_AVG, xlim = c(0, 70))
abline(lm(PeakToGone~NO3_AVG, data = subdata2))

and look if the line is visible, now. You'll find an answer to your 2nd question here.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!