title: plotting the mean and standard deviation of data when there is more than one piece of data collected at a particular point
body: <p>I have a matrix, in one columnn is the day of year and in the other is the data associated with that day of year. On some days of the year there are multiple data points, while others there is one or none. This makes it difficult to plot the information, what I would like to do is plot the data based on the mean and standard deviation of the data. So if data was collected three times on the 320th day of the year then the mean and standard deviation of these three data points would be found out and then when plotted the mean line would go through the mean and the standard deviation would represent error bars. So just say the data is:</p>
  
  <pre><code>DOY     DATA
  
  30,     12
  
  30,     10
  
  30,     8
  
  120,    6
  
  110,    5
  </code></pre>
  
  <p>I'd Like to transform it to:</p>
  
  <pre><code>DOY   DATA   STD
  
  30,   10,     2
  
  120,   6,      0
  
  110,   5,      0
  </code></pre>
  
  <p>I then wish to plot this data with the standard deviation representing error bars.
  How would I go about this?</p>
  
  <p>Thanks</p>