labelmachine is an R package that helps assigning meaningful labels to data sets. Furthermore, you can manage your labels in so called lama-dictionary files, which are yaml files. This makes it very easy using the same label translations in multiple projects which share similar data structure.

Labeling your data can be easy!

Concept

The label assignments are given in so called translations (named character vectors), which are like a recipes, telling which original value will be mapped onto which new label. The translations are collected in so called lama_dictionary objects. This lama_dictionary objects will be used to translate your data frame variables.

Highlights

labelmachine offers the following features:

  • All types of variables can be translated: Logical, Numeric, Character, Factor
  • When translating your variables, you may choose between keeping the current ordering or applying a new factor ordering to your variable.
  • Assigning meaningful labels to missing values (NA) is no problem.
  • Assigning NA to existing values is no problem.
  • Merging two values into a single label is no problem.
  • Transforming a data frame holding label assignment lists into a lama_dictionary is no problem.
  • Manage your translations in yaml files in order to use the same translations in different projects sharing similar data.

Further reading

A short introduction can be found here: Get started