[R] read.spss (package foreign) and SPSS 15.0 files

John Kane jrkrideau at yahoo.ca
Fri Apr 6 18:32:53 CEST 2007


--- Thomas Lumley <tlumley at u.washington.edu> wrote:

> On Thu, 5 Apr 2007, John Kane wrote:
> > Heck. I'd be happy to get an answer to what is
> > happening here:
> >> mac <- spss.get("H:/ONTH/Raw.data/Follow.sav")
> > Warning message:
> > H:/ONTH/Raw.data/Follow.sav: Unrecognized record
> type
> > 7, subtype 16 encountered in system file
> >
> 
> It means that your file had a record of type 7,
> subtype 16 in it, and 
> read.spss doesn't know how to handle these.
> 
> You would have to ask SPSS what record type 7 and
> subtype 16 represent -- 
> their software put them there, and it's their
> terminology.
> 
> People's experience with unrecognised record types
> is that they usually 
> don't matter, which would make sense from a
> backwards-compatibility point 
> of view, but in the absence of documentation or
> psychic powers it is hard 
> to be sure.  


Yes, that actually was what I meant.  I have had no
problems with SPSS 12 but 14 seems a bit nasty. 


 Sometime I may get a change to build a couple of test
files in SPSS that I can check. 

>Avoiding read.spss is a perfectly
> reasonable strategy, and is 
> in fact what we have always recommended in the Data
> Import-Export manual.

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.

> 
> AFAIK the only commercial statistical software
> vendor that does provide 
> complete, public documentation of their file formats
> is Stata, and this 
> is one reason why there are fewer complaints about
> read.dta and write.dta. 
> It also probably helps that the code was written by
> someone who uses Stata 
> -- there hasn't been much contribution of code or
> patches for the 
> foreign package from SPSS users.
> 
> 
>  	-thomas
>



More information about the R-help mailing list