Package: labelled 2.13.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:Joseph Larmarange [aut, cre], Daniel Ludecke [ctb], Hadley Wickham [ctb], Michal Bojanowski [ctb], François Briatte [ctb]

labelled_2.13.0.9000.tar.gz
labelled_2.13.0.9000.zip(r-4.5)labelled_2.13.0.9000.zip(r-4.4)labelled_2.13.0.9000.zip(r-4.3)
labelled_2.13.0.9000.tgz(r-4.4-any)labelled_2.13.0.9000.tgz(r-4.3-any)
labelled_2.13.0.9000.tar.gz(r-4.5-noble)labelled_2.13.0.9000.tar.gz(r-4.4-noble)
labelled_2.13.0.9000.tgz(r-4.4-emscripten)labelled_2.13.0.9000.tgz(r-4.3-emscripten)
labelled.pdf |labelled.html
labelled/json (API)
NEWS

# Install 'labelled' in R:
install.packages('labelled', repos = c('https://larmarange.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/larmarange/labelled/issues

Datasets:

On CRAN:

havenlabelsmetadatasasspssstata

14.56 score 74 stars 93 packages 2.2k scripts 61k downloads 74 exports 33 dependencies

Last updated 2 months agofrom:cae77cb9cf. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 03 2024
R-4.5-winNOTENov 03 2024
R-4.5-linuxNOTENov 03 2024
R-4.4-winNOTENov 03 2024
R-4.4-macNOTENov 03 2024
R-4.3-winNOTENov 03 2024
R-4.3-macNOTENov 03 2024

Exports:%>%add_value_labelsconvert_list_columns_to_charactercopy_labelscopy_labels_fromdrop_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_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:bitbit64clicliprcpp11crayondplyrfansiforcatsgenericsgluehavenhmslifecyclemagrittrpillarpkgconfigprettyunitsprogresspurrrR6readrrlangstringistringrtibbletidyrtidyselecttzdbutf8vctrsvroomwithr

About missing values: regular NAs, tagged NAs and user NAs

Rendered frommissing_values.Rmdusingknitr::rmarkdownon Nov 03 2024.

Last update: 2022-10-27
Started: 2021-10-29

Generate a data dictionnary and search for variables with look_for()

Rendered fromlook_for.Rmdusingknitr::rmarkdownon Nov 03 2024.

Last update: 2021-03-08
Started: 2020-08-16

Introduction to labelled

Rendered fromintro_labelled.Rmdusingknitr::rmarkdownon Nov 03 2024.

Last update: 2023-08-03
Started: 2015-07-12

Variables labels and packed columns

Rendered frompacked_columns.Rmdusingknitr::rmarkdownon Nov 03 2024.

Last update: 2023-08-13
Started: 2023-06-21

Readme and manuals

Help Manual

Help pageTopics
Copy variable and value labels and SPSS-style missing valuecopy_labels copy_labels_from
Drop unused value labelsdrop_unused_value_labels
Check if a factor is prefixedis_prefixed
Look for keywords variable names and descriptions / Create a data dictionaryconvert_list_columns_to_character generate_dictionary lookfor lookfor_to_long_format look_for look_for_and_select print.look_for
Get / Set SPSS missing valuesget_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 valuesnames_prefixed_by_values
Recode values with no label to NAnolabel_to_na
Recode some values based on conditionrecode_if
Recode valuesrecode.haven_labelled
Remove attributesremove_attributes
Remove variable label, value labels and user defined missing valuesremove_labels remove_user_na remove_val_labels remove_var_label
Sort value labelssort_val_labels
Convert tagged NAs into user NAstagged_na_to_regular_na tagged_na_to_user_na
Convert input to a character vectorto_character to_character.data.frame to_character.double to_character.haven_labelled
Convert input to a factor.to_factor to_factor.data.frame to_factor.haven_labelled unlabelled
Convert to labelled dataforeign_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 NAsduplicated_tagged_na order_tagged_na sort_tagged_na unique_tagged_na
Update labelled data to last versionupdate_labelled update_labelled.data.frame update_labelled.haven_labelled update_labelled.haven_labelled_spss update_labelled.labelled
Update variable/value labels with a functionupdate_value_labels_with update_variable_labels_with
Get / Set value labelsadd_value_labels get_value_labels remove_value_labels set_value_labels val_label val_label<- val_labels val_labels<-
Recode value labels to NAval_labels_to_na
Get / Set a variable labelget_label_attribute get_variable_labels label_attribute label_attribute<- set_label_attribute set_variable_labels var_label var_label.data.frame var_label<-
Datasets for testingdta_file spss_file x_haven_2.0 x_spss_haven_2.0