This question already has an answer here:
-
How to create, structure, maintain and update data codebooks in R?
4 answers
In analyzing data the metadata about variables is extremely important. How do you manage this information in R?
For example, is there a way to specify a label that will be printed instead of the variable name?
What facilities are there in R for this?
Quick suggestions that come to mind are
- attributes to store data along with an object (as Frank Harrell has championed for a long time)
- the
comment()
function can do parts of this
- the whole gamut of object-orientation to achieve different printing behaviour etc
Use the repo
package. You can assign each variable a long name, a description, a set of tags, a remote url, dependency relations and also attach to it figures or generic external files. Find the latest stable release on CRAN (install.packages("repo")
) or the latest development on github. A quick overview here. Hope it helps.