我如何处理plot.new

时间:2015-09-03 03:50:33

标签: r plot

food <- c(5, 8, 15, 20, 4, 18)
barplot(food)
meanValue <- mean(food)
abline(h=meanValue)
Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : 
  plot.new has not been called yet

我是R初学者。我该如何解决这个问题?我从其他答案中看到,我必须首先绘制它。但是我的情节是什么? plot(food)plot(meanValue)

0 个答案:

没有答案