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

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Mon 05 Dec 2005 - 23:33:15 EST

zorritillito-secure@yahoo.de wrote:

> --- ronggui <042045003@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@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

______________________________________________
R-help@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 Received on Mon Dec 05 23:42:27 2005

This archive was generated by hypermail 2.1.8 : Tue 06 Dec 2005 - 02:26:58 EST