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

pauljohn@ukans.edu pauljohn at ukans.edu
Fri Aug 24 08:23:52 CEST 2001


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.

Patrick McKnight wrote:
> 
> Soren,
> 
> The following code runs just fine from SAS V.8 and imports into R without
> a hitch:
> 
> libname xxx sasv5xpt 'yourfilenamehere';
> 
> data xxx.dat;
> set perm.yoursasv8data;
> run;
> 
> Hope this helps.

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