zorritillito-secure@yahoo.de
2005-Nov-21 12:14 UTC
[R] SPSS and R do they like each other?
Hi, I wonder how well SPSS and R communicate, because I need SPSS but would like to do some data manipulations in R. However I am very afraid of never ending import-export-complications ? especially with all those labels and extra information my SPSS files contain. My data come from SPSS and have to be exported to SPSS again (because I need to produce special output tables, which would be hard to generate in R). Have you done that kind of stuff? Thanks for sharing your experience! Michael
Hello Micael, 2005/11/21, zorritillito-secure at yahoo.de <zorritillito-secure at yahoo.de>:> Hi, > > I wonder how well SPSS and R communicate, because I > need SPSS but would like to do some data manipulations > in R. However I am very afraid of never ending > import-export-complications ? especially with all > those labels and extra information my SPSS files > contain. My data come from SPSS and have to be > exported to SPSS again (because I need to produce > special output tables, which would be hard to generate > in R).I've experiencing no big problems when choosing a simple text format for your data files! Since I don't know what data specifics characterize your files it is hard to assure everything will go well. But if you do choose the appropriate file format there shouldn't be too much problem moving files to and fro R. regards Thomas
zorritillito-secure@yahoo.de
2005-Nov-29 13:13 UTC
[R] SPSS and R ? do they like each other?
Well, it ??s not the output table that I need to share with SPSS, but the working data file itself. It contains labeled variables and values and the labels are important to me. That seems to be a problem since ? as you say ? at least read.spss ignores the labels. If I should ever have very very much time, I might try to write something that retains the labels. Thanks for your answers! Michael
======= 2005-11-29 21:13:14 伳侜佋佢伬伌佇伵佒佇佇伌伒伬仯伜======>Well, it 伌s not the output table that I need to share >with SPSS, but the working data file itself. It >contains labeled variables and values and the labels >are important to me. That seems to be a problem since >?as you say ?at least read.spss ignores the labels. >If I should ever have very very much time, I might try >to write something that retains the labels.In fact,when using read.spss to read the spss data file into R,the labels are retained (keeped) rather than be dropped. for example WVS is the data file be readed in,it has label.table and variable.labels.> names(attributes(WVS.CHINA))[1] "label.table" "variable.labels" "names" and label.table is something like "value: in spss file and variable.labels are "label" in spss data file. hope this helps.>Thanks for your answers! > >Michael > >______________________________________________ >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= = = = = = = = = = = = = = = = = = = 2005-11-29 ------ Deparment of Sociology Fudan University My new mail addres is ronggui.huang at gmail.com Blog:http://sociology.yculblog.com
zorritillito-secure@yahoo.de
2005-Dec-05 08:38 UTC
[R] SPSS and R ? do they like each other?
--- ronggui <042045003 at fudan.edu.cn> schrieb:> In fact,when using read.spss to read the spss data > file into R,the labels are retained (keeped) rather > than be dropped. > for example WVS is the data file be readed in,it has > label.table and variable.labels. > > names(attributes(WVS.CHINA)) > [1] "label.table" "variable.labels" "names" > and label.table is something like "value: in spss > file and variable.labels are "label" in spss data > file. > hope this helps.Thank you very much! I wil try that.
zorritillito-secure at yahoo.de wrote:> --- ronggui <042045003 at fudan.edu.cn> schrieb: > > >>In fact,when using read.spss to read the spss data >>file into R,the labels are retained (keeped) rather >>than be dropped. >>for example WVS is the data file be readed in,it has >>label.table and variable.labels. >> >>>names(attributes(WVS.CHINA)) >> >>[1] "label.table" "variable.labels" "names" >>and label.table is something like "value: in spss >>file and variable.labels are "label" in spss data >>file. >>hope this helps.And if you use spss.get in the Hmisc package (which uses read.spss) labels are attributes of individual variables, not of the data frame. The labels are automatically used in my Hmisc functions (describe, xYplot, Dotplot, summary.formula, contents, ...). Frank Harrell> > > Thank you very much! I wil try that. > > ______________________________________________ > 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 >-- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University