Package: labelled 2.16.0.9000

labelled: 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.
Authors:
labelled_2.16.0.9000.tar.gz
labelled_2.16.0.9000.zip(r-4.7)labelled_2.16.0.9000.zip(r-4.6)labelled_2.16.0.9000.zip(r-4.5)
labelled_2.16.0.9000.tgz(r-4.6-any)labelled_2.16.0.9000.tgz(r-4.5-any)
labelled_2.16.0.9000.tar.gz(r-4.7-any)labelled_2.16.0.9000.tar.gz(r-4.6-any)
labelled_2.16.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
card.svg |card.png
labelled/json (API)
NEWS
| # Install 'labelled' in R: |
| install.packages('labelled', repos = c('https://larmarange.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/larmarange/labelled/issues
Pkgdown/docs site:https://larmarange.github.io
- dta_file - Datasets for testing
- spss_file - Datasets for testing
- x_haven_2.0 - Datasets for testing
- x_spss_haven_2.0 - Datasets for testing
havenlabelsmetadatasasspssstata
Last updated from:dff9f053df. Checks:9 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-x86_64 | OK | 162 | ||
| source / vignettes | OK | 204 | ||
| linux-release-x86_64 | OK | 160 | ||
| macos-release-arm64 | OK | 99 | ||
| macos-oldrel-arm64 | OK | 117 | ||
| windows-devel | OK | 98 | ||
| windows-release | OK | 101 | ||
| windows-oldrel | OK | 138 | ||
| wasm-release | OK | 127 |
Exports:%>%add_value_labelsconvert_list_columns_to_charactercopy_labelscopy_labels_fromdictionary_to_value_labelsdictionary_to_variable_labelsdrop_unused_value_labelsduplicated_tagged_naforeign_to_labelledformat_tagged_nagenerate_dictionaryget_label_attributeget_na_rangeget_na_valuesget_value_labelsget_variable_labelsis_prefixedis_regular_nais_tagged_nais_user_nais.labelledlabel_attributelabel_attribute<-labelledlabelled_spsslook_forlook_for_and_selectlookforlookfor_to_long_formatmemisc_to_labelledna_rangena_range<-na_tagna_valuesna_values<-names_prefixed_by_valuesnolabel_to_naorder_tagged_naprint_labelsprint_tagged_narecode_ifremove_attributesremove_labelsremove_user_naremove_val_labelsremove_value_labelsremove_var_labelset_label_attributeset_na_rangeset_na_valuesset_value_labelsset_variable_labelssort_tagged_nasort_val_labelstagged_natagged_na_to_regular_natagged_na_to_user_nato_characterto_factorto_gtto_labelledunique_tagged_naunlabelledupdate_labelledupdate_value_labels_withupdate_variable_labels_withuser_na_to_nauser_na_to_regular_nauser_na_to_tagged_naval_labelval_label<-val_labelsval_labels_to_naval_labels<-var_labelvar_label<-
Dependencies:bitbit64clicliprcpp11crayondplyrforcatsgenericsgluehavenhmslifecyclemagrittrpillarpkgconfigprettyunitsprogresspurrrR6readrrlangstringistringrtibbletidyrtidyselecttzdbutf8vctrsvroomwithr
About missing values: regular NAs, tagged NAs and user NAs
Rendered frommissing_values.Rmdusingknitr::rmarkdownon May 14 2026.Last update: 2022-10-27
Started: 2021-10-29
Generate a data dictionary and search for variables with look_for()
Rendered fromlook_for.Rmdusingknitr::rmarkdownon May 14 2026.Last update: 2025-10-21
Started: 2020-08-16
Introduction to labelled
Rendered fromlabelled.Rmdusingknitr::rmarkdownon May 14 2026.Last update: 2025-01-07
Started: 2025-01-07
Variables labels and packed columns
Rendered frompacked_columns.Rmdusingknitr::rmarkdownon May 14 2026.Last update: 2023-08-13
Started: 2023-06-21
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| Copy variable and value labels and SPSS-style missing value | copy_labels copy_labels_from |
| Convert a dictionary data frame into a list of variable / value labels | dictionary_to_value_labels dictionary_to_variable_labels |
| Drop unused value labels | drop_unused_value_labels |
| Check if a factor is prefixed | is_prefixed |
| Look for keywords variable names and descriptions / Create a data dictionary | convert_list_columns_to_character generate_dictionary lookfor lookfor_to_long_format look_for look_for_and_select print.look_for to_gt |
| Get / Set SPSS missing values | get_na_range get_na_values is_regular_na is_user_na na_range na_range<- na_values na_values<- set_na_range set_na_values user_na_to_na user_na_to_regular_na user_na_to_tagged_na |
| Turn a named vector into a vector of names prefixed by values | names_prefixed_by_values |
| Recode values with no label to NA | nolabel_to_na |
| Recode some values based on condition | recode_if |
| Recode values | recode.haven_labelled |
| Remove attributes | remove_attributes |
| Remove variable label, value labels and user defined missing values | remove_labels remove_user_na remove_val_labels remove_var_label |
| Sort value labels | sort_val_labels |
| Convert tagged NAs into user NAs | tagged_na_to_regular_na tagged_na_to_user_na |
| Convert input to a character vector | to_character to_character.data.frame to_character.double to_character.haven_labelled to_character.survey.design |
| Convert input to a factor. | to_factor to_factor.data.frame to_factor.haven_labelled to_factor.survey.design unlabelled |
| Convert to labelled data | foreign_to_labelled memisc_to_labelled to_labelled to_labelled.data.frame to_labelled.data.set to_labelled.factor to_labelled.importer to_labelled.list |
| Unique elements, duplicated, ordering and sorting with tagged NAs | duplicated_tagged_na order_tagged_na sort_tagged_na unique_tagged_na |
| Update labelled data to last version | update_labelled update_labelled.data.frame update_labelled.haven_labelled update_labelled.haven_labelled_spss update_labelled.labelled |
| Update variable/value labels with a function | update_value_labels_with update_variable_labels_with |
| Get / Set value labels | add_value_labels get_value_labels remove_value_labels set_value_labels val_label val_label<- val_labels val_labels<- |
| Recode value labels to NA | val_labels_to_na |
| Get / Set a variable label | get_label_attribute get_variable_labels label_attribute label_attribute<- set_label_attribute set_variable_labels var_label var_label.data.frame var_label.survey.design var_label<- |
| Datasets for testing | dta_file spss_file x_haven_2.0 x_spss_haven_2.0 |
