This is the development repository for the R package ilabelled.
A function library for working with labelled data in R. This package introduces the data class 'i_labelled' for atomic vector objects which can be used within data.frames.
Install from CRAN install.packages('ilabelled') or the development version from this github repository remotes::install_github('https://github.com/clewerenz/ilabelled')
At this state of development the package version on github is ahead of CRAN's version, since the package is still under development in order to take specific use cases into account.
R is a great software for working with data. However, there is a non-negligible disadvantage when it comes to handling categorical data and meta-information, such as variable labels or scale levels, and the like, as known from other statistical software, especially SPSS.
The aim of this package is to introduce a data class in which meta information (variable-label, value-labels, missing-values, scale-level) can and should be directly included. In addition, one of the biggest disadvantages of the base R factor class is to be addressed: Numerical values are not changed if they are provided with value labels. Negative and non-sequential consecutive values are not changed. In other words: the underlying database is not changed by labeling. Nevertheless, the option of using value labels for indexing is offered.
An intuitive syntax enables easy access to package-specific functions. All functions available for data manipulation can be controlled by an “i_*”.
The inspiration for this package was drawn from the lfactors package, the labelled package and the sticky package with the aim to bring dependencies on bloated third party libraries to zero. The self-understanding of this package is not to be better than comparable libraries, but be a lightweight and slightly more intuitive alternative.