An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20061211/02992036/attachment-0005.pl
Hourly Time Series
3 messages · Harshal D Dedhia, Gabor Grothendieck, Jeffrey J. Hallman
4 days later
Using zoo would allow you to retain the date/time portion. In ts you would have to represent them as numbers; however, as you can easily switch from zoo to ts you probably want to use zoo in the first instance: library(zoo) library(chron) Lines <- "DateID HourID Metrics 20060920 0 1 20060920 1 2" z <- read.zoo(textConnection(Lines), header = TRUE, format = "%Y%m%d") metrics <- aggregate(z[,2], chron(unclass(time(z))) + unclass(z[,1])/24, sum) metrics as.ts(metrics)
On 12/11/06, Harshal D Dedhia <harshal at yahoo-inc.com> wrote:
I have hourly data for approximately 21 days in the following format
DateID HourID Metrics
20060920 0 xxxxxx
20060920 1 xxxxxx
The hour ids correspond to one hour windows starting 00:00 to 23:59.
I have never dealt with TS data before. What is the best way to handle
this data? TS objects or use the Zoo package?
Thanks in advance.
[[alternative HTML version deleted]]
______________________________________________ R-help at stat.math.ethz.ch 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.
The 'fame' package I submitted to CRAN can handle hourly, minutely, and secondly series. The first submission I made last night did not build correctly on a Linux machine without the FAME libraries, but the one I put up this morning has fixed that. It should be available soon, unless I missed another problem (entirely possible).
Jeff