[Rd] ?as.POSIXct (PR#13587)

lbraglia at gmail.com lbraglia at gmail.com
Tue Mar 10 15:45:10 CET 2009


Full_Name: Luca Braglia
Version: 2.8
OS: Windows
Submission from: (NULL) (85.18.136.110)


>From ?as.POSIXct

     ## SPSS dates (R-help 2006-02-17)
     z <- c(10485849600, 10477641600, 10561104000, 10562745600)
     as.Date(as.POSIXct(z, origin="1582-10-14", tz="GMT"))
                                           ^^

It should be 15 (Gregorian calendar adoption day, when SPSS starts to count
seconds behind dates) . With 14, I used a .sav dataset imported with read.spss,
and after as.Date(as.POSIXct()) I got (obviously)

R.date = SPSS.date - 1

Bye  (and thank you for givin'us R)



More information about the R-devel mailing list