Re: [R] Problem with zoo::window()

2011-09-27 Thread Gabor Grothendieck
On Tue, Sep 27, 2011 at 5:23 AM, Agustin Lobo wrote: > I have the following time series: > >> class(CCasadesz2) > [1] "zoo" >> setmanes <- cut(time(CCasadesz2),breaks="weeks") >> CCasadeswz <- aggregate(CCasadesz2,sum,by=setmanes) cut produces a "factor", not a "Date". The by= argument in aggrega

Re: [R] Problem with zoo::window()

2011-09-27 Thread Gabor Grothendieck
On Tue, Sep 27, 2011 at 5:23 AM, Agustin Lobo wrote: > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > Provide the output of dput(CCasadesz2) or if that is very large try to cut it down to make the

[R] Problem with zoo::window()

2011-09-27 Thread Agustin Lobo
I have the following time series: > class(CCasadesz2) [1] "zoo" > setmanes <- cut(time(CCasadesz2),breaks="weeks") > CCasadeswz <- aggregate(CCasadesz2,sum,by=setmanes) > class(CCasadeswz) [1] "zoo" > summary(CCasadeswz) Index CCasadeswz 2009-01-12 00:00:00: 1 Min. :