[R] Split a time series
Megh Dal
megh700004 at yahoo.com
Wed Jul 14 15:07:20 CEST 2010
Hi all, can somebody help me to split a time series (zoo) object on monthwise. For example, suppose I have following time series object:
library(zoo)
dat1 <- zooreg(rnorm(300), start=as.Date("2009-01-01"), frequency=1)
>From dat1, I want to create a list-object dat2 like:
dat2[[1]] <- all observation for jan-2009
dat2[[2]] <- all observation for feb-2009
etc.
Thanks
More information about the R-help
mailing list