I have just become aware of the label function in the Hmisc package. Yet, as far as I can see, this function does not solve my problem as axis labels still need to be manually specified as xlab=label(var).

I don't see any solution for producing nice tables either (xtable). Are there any packages I am not aware of that provide this sort of functionality ? In sum, I would like to do the following:

  • attach labels & units to variables, columns: label(wght) <- weight; unit(var) <- 'kg'
  • print them in a nice way, such that: wght <- c(20, 30); printnice(mean(wght)) -> '25 kg'
  • make plots, xtable use these 'nice' labels automatically
0

There are 0 answers