Howdy! I am attempting to convert a date frame with irregular dates into a regular time series, aggregated by date. i have tried using both the 'its' and 'zoo' packages.
I have something like times<-c("2003-03-05", "2003-03-05", "2003-05-05" ,"2003-04-07" ,"2003-03-05") aarf<-data.frame(times) aarf$x<-runif(5) what i want in the end, is a daily time series, aggregating x by day, and filling in days where there are no data with 0. I have tried, similarly to another help request, the aggregating once I have zoo-class data, but my dates disappear, and instead I get things like 12772 and so on for the various dates. I thought that these 5-digit numbers were maybe the number of days past Jan 1, 1970, but dividing these numbers by the number of days in a year gets me out of my data range. Also, applying as.ts() to my zoo data gives me a regularly spaced time series that ignores the timing imposed in zoo. Similarly, I can convert the series to an 'its' object, but then cannot convert the 'its' object to a regular time series with 0 filled in where I have no observations, since the 'its' arithmitic only returns the intersection of addition of two its vectors. Thanks, Nirav Mehta ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.