[R] how to read .sps (SPSS file extension)?

Eik Vettorazzi E.Vettorazzi at uke.uni-hamburg.de
Tue Nov 25 10:27:02 CET 2008


Hi Livio,
I think you mixed something up. The .sps - files are the syntax files of 
SPSS, and I think there is no automated way (but I would like to be 
corrected there) of converting SPSS syntax to R-code. The usual data 
files of spss  have the extension .sav. Such files can easily read by 
read.spss (package foreign) or spss.get (package Hmisc), if you think 
the variable labels of SPSS are fancy the latter approach is possibly 
more appropriate, because it adds an attribute with this label to each row.
hth.



livio finos schrieb:
> Hi everyone,
> I'm trying to import .sps (SPSS portable file) file.
> the read.spss function (library foreign) doesn't allow to import such files.
> should I import in spss and then save as sav file? there is not other
> solutions available?
> what I mostly like from spss file is that they have variable labels.
> want is really wish to keep are the variable.labels from the spss file; so,
> if there is a different way to bring them from the sps file will be also ok
> (I also have a csv copy but without the variable.labels obviously).
> thanks for any answer..
>   livio
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org 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.
>   

-- 
Eik Vettorazzi
Institut für Medizinische Biometrie und Epidemiologie
Universitätsklinikum Hamburg-Eppendorf

Martinistr. 52
20246 Hamburg

T ++49/40/42803-8243
F ++49/40/42803-7790



More information about the R-help mailing list