title: Add error bars to multiple lines to show standard deviation on a plot in R
body: <p>I have a plot with many diferent lines and I'd like to add error bars to each point on every line.</p>
  
  <pre><code>df &lt;- matrix(runif(25),5,5)
  plot(1:5,seq(0,1,1/4),type = 'n')
  mapply(lines,as.data.frame(df),col=cols,pch=1:5,type="o")
  </code></pre>
  
  <p>I have tried to use the <code>arrows</code> function but with no success.</p>
  
  <pre><code>stdev &lt;- matrix(runif(25,0,0.1),5,5)
  A &lt;- as.data.frame(df) + as.data.frame(stdev)
  B &lt;- as.data.frame(df) - as.data.frame(stdev)
  mapply(arrows(1:5,A,1:5,B,col=cols,angle=90,length=0.03, code=3))
  </code></pre>
  
  <p>Any suggestions?</p>