[R] RE: aggregating dates

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Feb 1 09:10:51 CET 2005


On Tue, 1 Feb 2005, Paul Sorenson wrote:

> The solution I came up with myself was simply to coerce the integer back 
> to POSIXct:
>
> 	class(ev$date) = "POSIXct"
>
> Can't say it is the right way to do it but it seem to work.

It will work partially.  The correct class is c("POSIXt", "POSIXct").
As I believe others have said,  ISOdate(1970,1,1) + x  is safer.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list