[R] Dates in Windows

Tom McCallum termcc at googlemail.com
Thu Jun 14 12:22:45 CEST 2007


Hi everyone,

When using R on Linux I can do the following:

> x <- as.Date("01/04/2007", "%d/%m/%Y");
> x
[1] "2007-04-01"
> print(format(x, "%s"));
[1] "1175385600"

When using R in Windows XP though the format "%s" does nothing but return  
a blank string.  How can I convert a date to the number of seconds since  
1970 in Windows?

Cheers

Tom



More information about the R-help mailing list