title: Add regression line to plot (plotmeans)
body: <p>My problem is that I would like to create plot with mean values and standard deviation.  </p>
  
  <p>I found the function <code>plotmeans</code> in package <code>gplots</code> and now I would like to add a trendline to that graph. I try to do this with <code>abline</code> but it is not working. I would be really grateful for some help.</p>
  
  <p>My data looks like this:</p>
  
  <pre><code>year &lt;- c(2004, 2004, 2004, 2005, 2005, 2005, 2006, 2006, 2006, 2007, 2007, 2007, 2008, 2008, 2008, 2009, 2009, 2009)
  value &lt;- c(116,114,115,110,110,109,100,99,102,95,96,95,90,91,94,70,71,73)
  df &lt;- data.frame(year, value); head(df)
  library(gplots)
  
  plotmeans(value ~ year, data= df, p = 0.99, connect= FALSE)
  abline(h=c(100), col= "blue", lty= 2)
  abline(lm(value ~ year, data= df))
  </code></pre>
  
  <p>So the first <code>abline</code> works OK, but the lm line not.</p>