title: How do I address plot.new
body: <pre><code>food &lt;- c(5, 8, 15, 20, 4, 18)
  barplot(food)
  meanValue &lt;- 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
  </code></pre>
  
  <p>I'm an R beginner. How do I address this? I see from the other answers that I have to plot it first. But what do I plot? <code>plot(food)</code> or <code>plot(meanValue)</code>? </p>