title: Adding values to barplot of table in R
body: <p>I am trying to plot a table with barplot and adding values to it. </p>
  
  <pre><code>tt = structure(c(7L, 13L, 24L, 30L, 30L, 38L, 35L, 45L, 37L, 
  43L, 38L, 59L, 33L, 45L, 37L, 58L), .Dim = c(2L, 8L), .Dimnames = structure(list(param = c("A", 
  "B"), xvar = c("5", "6", "7", "8", "9", "10", "11", "12")), .Names = c("param", "xvar")), class = "table")
  tt
       xvar
  param  5  6  7  8  9 10 11 12
      A  7 24 30 35 37 38 33 37
      B 13 30 38 45 43 59 45 58
  
  bb= barplot(tt)
  text(bb, 0, tt)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/EbchG.png" alt="enter image description here"></p>
  
  <p>And:</p>
  
  <pre><code>bb= barplot(tt)
  text(bb, tt, tt)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/xmJOi.png" alt="enter image description here"></p>
  
  <p>Both do not put values properly. I also tried t(tt) in text() but it does not work properly. How can this be done. Thanks for your help.</p>