I'd like to take a different approach to the old question of dataset
variable labels. Support for their use in output is low. For example, among
packages that provide tables of model estimates only 'stargazer' provides
support for these labels (apologies if I missed support from aprstable,
memisc, texreg, xtable).

Part of the lack of support could be that variable labels are not handled
automatically by the data.frame functions. Support has been added by
subsequent packages but they differ in implementation. Hmisc and memisc
attach the labels individually to the variables. Foreign and surveydata
attach the labels all together to the dataframe. I thank those package
authors for tackling this issue as R lags behind other software in this
regard (Stata for example supports multiple sets of labels for different
languages). This diversity, though, discourages other package writers from
adding streamlined support for outputting variable labels.

I think that R would benefit from more direct coordination on a preferred
solution. If R developers wanted to limit features in the core, then
everyone could just "coordinate" on one of the
existing implementations that uses subclassing (and could add support in
related packages like graphics). Another option mentioned on the mailing
list is allowing in the R core certain attributes to be maintained across
subsetting.

What do others think? Would it be beneficial to coordinate on one way to
store/maintain variable labels? Should this be via new support for
maintaining attributes across subsetting?

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to