title: text not showing up on plot in r
body: <p>I have a dataframe named <code>tab</code> of the following format:</p>
  
  <pre><code>  Var1  Freq
  1    5  1853
  2   15  2862
  3   25  7206
  4   35 14890
  5   45 19856
  6   55 23837
  7   65 16510
  8   75  4729
  9   85   830
  </code></pre>
  
  <p>I want to make a barplot and have the <code>Freq</code> displayed on the bar. </p>
  
  <p>I have tried the following:</p>
  
  <pre><code>plot(tab$Var1, tab$Freq)
  
  text(
      x      = tab$Var1, 
      y      = tab$Freq, 
      labels = row.names( tab$Freq ),
      adj    = 0)
  </code></pre>
  
  <p>There seems to be two things wrong here:</p>
  
  <ol>
  <li><p>The plot is showing lines instead of bars, and <code>barplot(tab$Freq)
  axis(1, xaxp = tab$Var1)</code> gives error that <code>Error in axis(1, xaxp = tab$Var1) : plot.new has not been called yet</code> (PART 1 SOLVED).</p></li>
  <li><p>Using the original <code>plot</code> and <code>text</code> function, the texts do not show up.</p></li>
  </ol>
  
  <p>Thanks.</p>