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:
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')) |
Bug tracker:https://github.com/larmarange/labelled/issues
- 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 2 months agofrom:cae77cb9cf. Checks:OK: 1 NOTE: 6. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Nov 03 2024 |
R-4.5-win | NOTE | Nov 03 2024 |
R-4.5-linux | NOTE | Nov 03 2024 |
R-4.4-win | NOTE | Nov 03 2024 |
R-4.4-mac | NOTE | Nov 03 2024 |
R-4.3-win | NOTE | Nov 03 2024 |
R-4.3-mac | NOTE | Nov 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.Rmd
usingknitr::rmarkdown
on 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.Rmd
usingknitr::rmarkdown
on Nov 03 2024.Last update: 2021-03-08
Started: 2020-08-16
Introduction to labelled
Rendered fromintro_labelled.Rmd
usingknitr::rmarkdown
on Nov 03 2024.Last update: 2023-08-03
Started: 2015-07-12
Variables labels and packed columns
Rendered frompacked_columns.Rmd
usingknitr::rmarkdown
on Nov 03 2024.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 |
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 |
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 |
Convert input to a factor. | to_factor to_factor.data.frame to_factor.haven_labelled 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<- |
Datasets for testing | dta_file spss_file x_haven_2.0 x_spss_haven_2.0 |