Skip to content
Prev 61957 / 398498 Next

"labels" attached to variable names

Denis Chabot wrote:
The Hmisc package supports this:

label(x) <- 'Some Label'
describe(x)            # uses variable name and label
plot(x, y, xlab=label(x))
Better: xYplot(x, y)   # label used automatically

And if you do units(x) <- 'whatever units of measurement'  then xYplot, 
describe, and other Hmisc functions will include the units (in a 
different font on graphs or when using latex()).

Frank