Why does this happen?
plot(x,y) yx.lm <- lm(y ~ x) lines(x, predict(yx.lm), col=\"red\")
Error in plot.xy(xy.coords
plot.xy(xy.coords
plot.new() error occurs when only part of the function is ran.
Please find the attachment for an example to correct error With error....When abline is ran without plot() above Error-free ...When both plot and abline ran together