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]]
Hi Livio, On Monday 24 November 2008 (21:44:45), livio finos wrote:> 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.Is this really a 'portable' file (usually these files have the extension '.por')? Or a fixed column file with an accompanying syntax file defining value labels and so on?> 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..Maybe you could try one of 'spss.fixed.file' 'spss.portable.file' or 'spss.system.file' from package 'memisc' (on CRAN). The package contains some features that allow to retain the information contained in spss's value labels, missing values etc. HTH Martin ------------------------------------------------- Dr. Martin Elff Lecturer LSPWIVS (Prof. van Deth) Department of Social Sciences University of Mannheim A5, 6 68131 Mannheim Germany Phone: +49-621-181-2093 Fax: +49-621-181-2099 E-Mail: elff at sowi.uni-mannheim.de Web: http://webrum.uni-mannheim.de/sowi/elff/ http://www.sowi.uni-mannheim.de/lspwivs/
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