Skip to content
Back to formatted view

Raw Message

Message-ID: <4394338B.4090208@vanderbilt.edu>
Date: 2005-12-05T12:33:15Z
From: Frank E Harrell Jr
Subject: SPSS and R ? do they like each other?
In-Reply-To: <20051205083842.31533.qmail@web86804.mail.ukl.yahoo.com>

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