[R] read.spss and time/date information
Torsten Hothorn
Torsten.Hothorn at rzmail.uni-erlangen.de
Wed Mar 3 15:57:10 CET 2004
Hi,
I could not find any information on how `read.spss' deals with date
information. As an example, I created a file containing two variables,
one numeric (values = (1, 2)) and one of type "Datum" in SPSS (german
version with values "11.02.2003" and "03.04.1999" and I get in R:
SPSSfile = url("http://www.imbe.med.uni-erlangen.de/~hothorn/dates.sav", "rb")
SPSSdata = readBin(SPSSfile, "numeric", n = 10000)
writeBin(SPSSdata, con = "dummy.sav")
library(foreign)
read.spss("dummy.sav")
$DUMMY
[1] 1 2
$DATE
[1] 13264300800 13142476800
attr(,"label.table")
attr(,"label.table")$DUMMY
NULL
attr(,"label.table")$DATE
NULL
Could anyone give me a a hint how I can convert 13264300800 to 2003/02/11
again, please?
Best,
Torsten
More information about the R-help
mailing list