Regression line does not show on scatterplot
You swapped the x and y variables in the plot command. lm(y~ x) but plot(x, y) On Tue, Dec 18, 2012 at 3:09 PM, Beatriz Gonz?lez Dom?nguez
<harimaguadas at gmail.com> wrote:
Hello, I have done a scatterplot and now would like to add its regression line but it does not show. Below, the code I have used. lm3 <- lm(data$S_pH_KCl2.5_BCx~data$B_OleicoPF_BCx_per) plot(data$S_pH_KCl2.5_BCx, data$B_OleicoPF_BCx_per) abline(lm3) I have been able to do the complete operation using the software STATISTICA but it would be great to do it with R. If you require more details please get in touch. Thanks a lot! Bea
-- Sarah Goslee http://www.functionaldiversity.org