labelled v2.7.0
Monthly downloads
Manipulating Labelled Data
Work with labelled data imported from 'SPSS'
or 'Stata' with 'haven' or 'foreign'. This package
provides useful functions to deal with "haven_labelled" and
"haven_labelled_spss" classes introduced by 'haven' package.
Readme
labelled 
This package is built on the new classes haven_labelled and
haven_labelled_spss introduced by haven package to handle labelled
variables imported from SPSS, Stata and SAS. The labelled package
propose several functions to manipulate such vectors and their metadata:
variable labels, value labels and user-defined missing values.
Installation
From CRAN:
install.packages("labelled")
Development version from GitHub:
devtools::install_github("larmarange/labelled")
Introduction
Read the vignette at https://larmarange.github.io/labelled/articles/intro_labelled.html
Cheatsheet
Some general guidelines
- Functions are intended to support
labelledmetadata structures only. However,to_labelled()method allows to convert metadata from foreign and memisc packages. - Functions should, by default, modify metadata only (i.e. classes and attributes), except if explicitly expressed by the user.
Functions in labelled
| Name | Description | |
| names_prefixed_by_values | Turn a named vector into a vector of names prefixed by values | |
| nolabel_to_na | Recode values with no label to NA | |
| recode.haven_labelled | Recode values | |
| to_labelled | Convert to labelled data | |
| reexports | Objects exported from other packages | |
| to_factor | Convert input to a factor. | |
| sort_val_labels | Sort value labels | |
| to_character | Convert input to a character vector | |
| copy_labels | Copy variable and value labels and SPSS-style missing value | |
| drop_unused_value_labels | Drop unused value labels | |
| val_labels_to_na | Recode value labels to NA | |
| var_label | Get / Set a variable label | |
| remove_attributes | Remove attributes | |
| remove_labels | Remove variable label, value labels and user defined missing values | |
| look_for | Look for keywords variable names and descriptions / Create a data dictionary | |
| na_values | Get / Set SPSS missing values | |
| update_labelled | Update labelled data to last version | |
| val_labels | Get / Set value labels | |
| No Results! | ||
Vignettes of labelled
| Name | ||
| approaches.drawio | ||
| approaches.png | ||
| intro_labelled.Rmd | ||
| look_for.Rmd | ||
| No Results! | ||
Last month downloads
Details
| Type | Package |
| License | GPL-3 |
| Encoding | UTF-8 |
| LazyData | true |
| URL | http://larmarange.github.io/labelled/ |
| BugReports | https://github.com/larmarange/labelled/issues |
| VignetteBuilder | knitr |
| RoxygenNote | 7.1.1 |
| RdMacros | lifecycle |
| NeedsCompilation | no |
| Packaged | 2020-09-21 16:08:06 UTC; josep |
| Repository | CRAN |
| Date/Publication | 2020-09-21 16:50:07 UTC |
| suggests | covr , knitr , questionr , rmarkdown , snakecase , testthat , utf8 |
| imports | dplyr , haven (>= 2.3.1) , lifecycle , pillar , rlang , tidyr , vctrs |
| enhances | memisc |
| Contributors | Daniel Ludecke, Hadley Wickham, Michal Bojanowski, Fran<c3><a7>ois Briatte |
Include our badge in your README
[](http://www.rdocumentation.org/packages/labelled)
