[R] epoch time conversion in R
Thomas Lumley
tlumley at u.washington.edu
Thu Feb 27 16:02:03 CET 2003
On Wed, 26 Feb 2003, Sharad Agarwal wrote:
> I have a data file where each entry is indexed by the time in seconds since
> epoch (e.g. 1046315697). Is there an easy way to convert this time value into
> a more friendly time (such as Month-Year) when plotting it?
>
Yes. As POSIXct objects are also indexed in seconds you can do something
like
ISOdate(1960,1,1)+time.in.sec
using your epoch date instead of 1960-1-1
-thomas
More information about the R-help
mailing list