[R] convert from seconds to date-time objects

John Bjornar Bremnes J.B.Bremnes at met.no
Mon Feb 3 18:04:02 CET 2003


The solution turned out to be simple:

> x <- 0:100
> class(x) <- "POSIXct"
> x


John Bjornar

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?
> 
> thanks
> 
> --
> John Bjornar Bremnes
> Norwegian Meteorological Institute (met.no)
> Research and Development Department
> P.O.Box 43 Blindern, N-0313 Oslo, Norway
> Phone: (+47) 2296 3326. Fax: (+47) 2269 6355
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list