Variable lables (was Re: [R] Reading SAS version 8 data into R

Prof Brian D Ripley ripley at stats.ox.ac.uk
Fri Aug 24 08:46:17 CEST 2001


On Fri, 24 Aug 2001 pauljohn at ukans.edu wrote:

> I will try this method to export a sas file, but reading it made
> me wonder about "variable lables" and "value lables" in R.  In
> SAS and SPSS, the lables are a huge chunk of code and people
> want to hang onto them.  In case you have not used data from the
> Universty of Michigan's ICPSR, you might not have seen how
> elaborate this can get.  Here's a link to a SAS program that
> reads in an ascii dataset. It has thousands of lables:
>
> http://lark.cc.ukans.edu/~pauljohn/sa2684.gz
>
> (This is a famous one, the American National Election Study)
>
> Netscape unzips this and shows it as text on the screen.
>
> A program like SAS or SPSS will use these lables to beautify
> frequencies and such, and I've not heard much in the R group
> about it, and I just wondered if you do ever talk about it.

Because it's no big deal. Those are factor levels.  R has factors.
Whether they get exported from SAS and converted by read.xpt I can't say.

Now R has connections it would be appear to be easy to read that file (even
the compressed version) directly into R.

Brian

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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