considering the following data.frame I would like to calculate the mean between 2011-01-03 and 2011-01-06:
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
The result of the code mean(data$GOOG.Open, seq(from=01/03/11, to=01/06/11))
gives me 529.8661 and is actually referencing to different values in the Data Frame. Do you know how to calculate the mean?