What is a simple way to force time series data to a data frame in a format in which the resulting data is a summary of the original?
These may be some examples of data stored in an xts or zoo object:
t, V1 "2010-12-03 12:00", 10.0 "2010-11-04 12:00", 10.0 "2010-10-05 12:00", 10.0 "2010-09-06 12:00", 10.0 ...and so on, monthly data for many years.
and I would like to convert it to a data frame, for example:
year, month, V1 2010, 12, a descriptive statistic calculated of that month data 2010, 11, ... 2010, 10, ... 2010, 9, ...
The reason I ask about this is because I want to calculate the monthly calculation summaries of the data in the same plot. I can do this quite easily for data in the latter format, but I have not found a method for plotting the time series format.
For example, I can have temperature data for several years, measured in the daily interval, and I would like to build curves for the average monthly temperatures for each year on the same site. I did not understand how to do this using data formatted in xts format, or even if it is even suitable for formatting data in xts / zoo format, which seems to always contain year information on it.