title: R Time series - having trouble making bollinger lines - need simple example please
body: <p>Learning R language - I know how to do a moving average but I need to do more - but I am not a statistician - unfortunately all the docs seem to be written for statisticians.</p>
  
  <p>I do this in excel a lot, it's really handy for analysis of operational activities.</p>
  
  <p>Here are the fields on each row to make <a href="http://www.bollingerbands.com/" rel="nofollow noreferrer">bollinger bands</a>:</p>
  
  <p>Value could be # of calls, complaint ratio, anything</p>
  
  <p>TimeStamp | Value | Moving Average | Moving STDEVP | Lower Control | Upper Control</p>
  
  <p>Briefly, the moving avg and the stdevP point to the prior 8 or so values in the series. Lower control at a given point in time is = moving average - 2*moving stdevP and upper control = moving average + 2*moving stdevP</p>
  
  <p>This can easily be done in excel for a single file, but if I can find a way to make R work R will be better for my needs. Hopefully faster and more reliable when automated, too.</p>
  
  <p>links or tips would be appreciated.</p>