plot.new has not been called yet

后端 未结 6 1687
北荒
北荒 2020-12-01 12:13

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

6条回答
  •  误落风尘
    2020-12-01 12:32

    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

提交回复
热议问题