[R] aggregate for zoo or its?

Jeffrey J. Hallman jhallman at frb.gov
Mon Mar 8 23:12:03 CET 2010


Or for real power and flexibility, see the 'convert()' function in package
tis.

Jeff

Gabor Grothendieck <ggrothendieck at gmail.com> writes:
> See ?aggregate.zoo, e.g.
>
> library(zoo)
> z <- zoo(1:1000, as.Date("2000-01-01") + 0:999)
> aggregate(z, as.yearmon, mean)
>
> or replace mean with whatever summarization you want.
>
> On Sun, Mar 7, 2010 at 5:29 PM, Erin Hodgess <erinm.hodgess at gmail.com> wrote:
>> Dear R People:
>>
>> The aggregate function works very well on regular time series.
>>
>> Is there a version for zoo or its that would take daily data and
>> convert it to monthly, please?
>>

-- 
Jeff



More information about the R-help mailing list