Which R time/date class and package to use?
(I am moving this from the comments to the answer portion of stackoverflow at the request of the original poster.)
There is an article in R News 4/1 ("R Help Desk", p. 29) that specifically compares Date
, POSIXct
and chron
. (The 1st two are in core of R and chron
is a package.)
timeDate
class (in the timeDate
package) is based on POSIXct
but has extra time zone/financial center support.
For regularly spaced series the the tis
package supports many notions of dates.
The mondate
package supports accounting dates.
The zoo
time series package supports just about any date/time class and also has yearmon
and yearqtr
for ts
compatibility.
The xts
time series package works on top of zoo
and handles the most common date/time classes by translating them to POSIXct
and back again.
There is also information in the Time Series CRAN Task View.
Use POSIXct and lubridate.