[R] Help with conversion of variable labels (Hmisc and Epicalc)

David Winsemius dwinsemius at comcast.net
Fri Sep 26 16:12:07 CEST 2014

On Sep 26, 2014, at 3:21 AM, Otto Pichlhöfer wrote:

> For my epidemiological analysis I use the packages Epicalc and Hmisc – 
> among others. Both packages allow to assign variable labels that will 
> appear in the output of the respective packages’ own functions. The modes 
> of storage of the labels in a dataframe are very different. I am 
> wonderiung if there is a function that would allow to easily convert 
> Epicalc labels to Hmisc labels and possibly the other way around. 
> Unfortunately I am not adept enough in R to write such a function myself.

You needt to use the attributes function to display hte names and structures of the "labels" in the two packages. Firts look at help(pack=Hmisc) and help(pack=Epicalc) to see how the package-specific functions are documented.


David Winsemius
Alameda, CA, USA

More information about the R-help mailing list