[R] read.spss (package foreign) and SPSS 15.0 files
Frank E Harrell Jr
f.harrell at vanderbilt.edu
Fri Apr 6 21:18:19 CEST 2007
Charilaos Skiadas wrote:
> On Apr 6, 2007, at 12:32 PM, John Kane wrote:
>
>> I have simply moved to exporting the SPSS file to a
>> delimited file and loading it. Unfortunately I'm
>> losing all the labelling which can be time-consuming
>> to redo. Some of the data has something like 10
>> categories for a variable.
>
> I save as csv format all the time, and it offers me a choice to use
> the labels instead of the corresponding numbers. So you shouldn't
> have to lose that labelling.
>
> Haris Skiadas
> Department of Mathematics and Computer Science
> Hanover College
That's a different point. The great advantage of read.spss (and the
spss.get function in Hmisc that uses it) is that long variable labels
are supported in addition to variable names. That's why I like getting
SPSS or Stata files instead of csv files. I'm going to enhance csv.get
in Hmisc to allow a row number to be specified, to contain long variable
labels.
Frank
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
More information about the R-help
mailing list