>>The down side to R's factor solution:

>>The numerical values of factors are always 1 to number of levels. Thus, it

>>can be tough and requires great care to work with studies that have both

>>numerical values different from this and value labels. This situation is

>>currently not well-supported by R.

>>

>>Regards, Ulrike

>>

>>P.S.: I fully agree with Frank regarding the annoyance one sometimes

>>encounters with formats in SAS!

> You can add an attribute to a variable.  In the sas.get function in the 
> Hmisc package for example, when importing SAS variables that have PROC 
> FORMAT value labels, an attribute 'sas.codes' keeps the original codes; 
> these can be retrieved using sas.codes(variable name).  This could be 
> done outside the SAS import context also. 
> 
> Frank 
> -- 
> Frank E Harrell Jr   Professor and Chair           School of Medicine 
>                      Department of Biostatistics   Vanderbilt University

Frank,

are these attributes preserved when merging or subsetting a data frame?
Are they used in R packages other than Hmisc and Design (e.g. in a simple table 
request)?

If this is the case, my wishlist items 8658 and 8659 
(http://bugs.r-project.org/cgi-bin/R/wishlist?id=8658;user=guest, 
http://bugs.r-project.org/cgi-bin/R/wishlist?id=8659;user=guest) can be closed. 
Otherwise, I maintain the opinion that there are workarounds but that R is not 
satisfactorily able to handle this type of data.

Regards, Ulrike

------- End of Original Message -------
 

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to