[R] Importing data

Frank E Harrell Jr f.harrell at vanderbilt.edu
Sun Jan 6 15:54:44 CET 2008

Simo Vundla wrote:
> Hi,
> I'm trying to import categorical data from SPSS to R using the script:
> xxx <-spss.get("xxx.por", use.value.labels=TRUE) but unfortunately am getting an error message 'error reading portable-file dictionary'.
> I have successfully imported data in the past. 
> What could be the problem with this data?
> Thanks
> Simo

First of all, follow the posting guide.  Second, state which package you 
are using (in this case Hmisc).

spss.get in Hmisc uses read.spss in the foreign package.  See the 
documentation of read.spss for more details. You will find there:

'read.spss' reads a file stored by the SPSS 'save' and 'export'
  commands and returns a list.

read.spss does not claim to be able to read SPSS .por files.

Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

More information about the R-help mailing list