title: Calculate mean based on time horizons
body: <p>considering the following data.frame I would like to calculate the mean between 2011-01-03 and 2011-01-06:    </p>
  
  <pre><code>             GOOG.Open GOOG.High GOOG.Low GOOG.Close GOOG.Volume
  2011-01-03    297.94    302.49   297.94     301.87          NA
  2011-01-04    302.51    302.79   299.76     300.76          NA
  2011-01-05    299.73    304.86   299.72     304.23          NA
  2011-01-06    305.03    308.91   304.72     306.44          NA
  </code></pre>
  
  <p>The result of the code <code>mean(data$GOOG.Open, seq(from=01/03/11, to=01/06/11))</code> gives me 529.8661 and is actually referencing to different values in the Data Frame. Do you know how to calculate the mean? </p>