[R] convert from seconds to date-time objects

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Mon Feb 3 19:38:03 CET 2003


On Mon, 3 Feb 2003, John Bjornar Bremnes wrote:

> A colleague of mine would like to know how seconds since 1970
> (represented as integers) can be converted to date-time objects? 

structure(as.double(x), class=c("POSIXt", "POSIXlt"))

will do it in the current version.

-- 
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