[R] Dates in read.spss

Frank E Harrell Jr fharrell at virginia.edu
Tue Apr 22 14:46:36 CEST 2003


Many thanks to Scot McNary, Thomas Lumley, and Peter Dalgaard.  
ISOdate(1584,10,14) + x worked like a charm in converting SPSS dates to POSIX.

I have written a little function spss.get that calls read.spss and makes the needed changes in date/time variables.  It also converts integer-valued variables to be stored as integers and associates variable labels with each variable as Hmisc expects (as with sas.get).  spss.get will be in the next version of the Hmisc package.  

read.spss works extremely well for us.  I especially appreciate how it sets up value labels in factors.  It was also able to import an SPSS files that S-Plus 6 could not import properly.  Thanks to Saikat DebRoy for writing read.spss.
---
Frank E Harrell Jr              Prof. of Biostatistics & Statistics
Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
U. Virginia School of Medicine  http://hesweb1.med.virginia.edu/biostat



More information about the R-help mailing list