title: How to add error bars to barplot in R
body: <p>I am new to R and have produced a graph, but I want to add error bars as simply as possible and I do not know how.</p>
  
  <pre><code>ana &lt;- read.table(text="Infiltration    Grazing Burn
  3301.145496 G   S
  8165.771889 U   S
  9937.833576 G   L
  11576.5892  U   L
  32739.07643 G   N
  25923.84328 U   N", header=TRUE)
  </code></pre>
  
  <p>That is my data and below is the code I have used.</p>
  
  <pre><code>    barplot(xtabs(ana$Infiltration ~ ana$Grazing + ana$Burn ),beside = TRUE, col = c( "tan4", "darkgreen"), xlab = "Burn Treatment", names = c( "Long Rotation", "Burned 1954", "Short Rotation" ) , ylab = "Mean Infiltration Rate (mm/h) " , legend = c( "Grazed", "Ungrazed"), args.legend = list(title = "Graze Treatment", x = "topright", cex = .7), ylim = c(0, 35000)  ) 
  </code></pre>
  
  <p>as I am new to R please explain as simply as possible!</p>