Possible Duplicate:
The hourly mean in time series
I have a time series:
It is data that is measured every 30min, so I have 536 days with
n=25728.
It is a ts
with one column and freq=48
. I would like to calculate the mean for every 30min.
So for example:
First 30min:
ts[1]+t[49]+t[97]+t[145]+.../536 days
Second 30min:
t[2]+t[50]+t[98]+..../536 days
What is the best code?