Skip to content
Prev 731 / 15274 Next

Date calculations

On Wed, 22 Mar 2006 00:38:20 -0600 P. H?naff wrote:

            
In that case I would recommend to go with the "Date" class available in
base R, e.g.
  as.Date("2005-04-03") + 0:10
which should be rather self-explanatory.

The package zoo provides time series infrastructure where the time
information can be stored in "Date" (or virtually any other class).
  library("zoo")
  z <- zoo(rnorm(11), as.Date("2005-04-03") + 0:10)
  plot(z)

hth,
Z