[R] Value lables, variable lables

Paul E Johnson pauljohn at ukans.edu
Wed Nov 28 17:04:54 CET 2001


I'm looking for an analogy to SPSS and "variable lable" and "value 
lable" in R. I have a copy of S+4.0 and can't find any info in their 
docs, and don't find it in R-intro either.


In SPSS, for each variable, there is a name like

VAR001

and a variable lable (a longer descriptive string) like

Respondent ID

and for many of the values of other variables there are value lables.
For example, VAR008 has the lable

GENDER of Respondent

and it has values of 0 and 1, and the values are labled

0   Male
1   Female

Sometimes value lables are much longer strings.

Whenever a person runs a model in SPSS, the printout automatically finds 
the lable and prints it along with the variable name and the values are 
replaced by their lables.

In R, does one keep a list of variable lables and value lables? If so, 
where?  It seems to me that an R collection type like Map or Hash would 
be needed so one could put in a variable name and get back a lable.

-- 
Paul E. Johnson                       email: pauljohn at ukans.edu
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list