[R] SPSS and R ? do they like each other?

Frank E Harrell Jr f.harrell at vanderbilt.edu
Mon Dec 5 13:33:15 CET 2005


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




More information about the R-help mailing list