[R] daily time series in R
John Muller
jmuller at mindspring.com
Fri Apr 30 17:07:30 CEST 2004
I have some daily data and would like to apply some of the time series functions to it.
I have read various notes in the help archive on this, the latest I found suggested
that I need to use the irts class (Irregularly spaced time series) for daily data
since a year does not divide into an integer number of days.
I see why I would have to do that if I have gaps (e.g. only data on weekdays)
but do I still have to do that even if I have no gaps, that is if I have every
data for every day of the year? In the latter case, the data is evenly spaced,
it;s just that a year is not an integer multiple of this spacing.
I have the same question for weekly data
(which I might create from daily data sampled only on work or weekdays)
Here again, the data is sampled at regular intervals, but a year is not
an integer multiple of the distance between samples.
Can you give some suggestions for dealing with this?
Should I first create an irts object and then create a ts from that?
If that is the suggestion, then when I get a ts object I have noticed
that in the plot the time axis has year and a decimal fraction of year.
What's a good way to get more standard time increments on the X axis,
such as months or week start days?
Thanks greatly,
- john muller
More information about the R-help
mailing list