Skip to contents

Manipulating variable labels

Functions to set, manipulate and remove variable labels

var_label() `var_label<-`() get_variable_labels() set_variable_labels() label_attribute() get_label_attribute() set_label_attribute() `label_attribute<-`()
Get / Set a variable label
remove_labels() remove_var_label() remove_val_labels() remove_user_na()
Remove variable label, value labels and user defined missing values
copy_labels() copy_labels_from()
Copy variable and value labels and SPSS-style missing value
update_variable_labels_with() update_value_labels_with()
Update variable/value labels with a function

Manipulating value labels

Functions to set, manipulate and remove value labels

reexports labelled is.labelled labelled_spss print_labels %>% tagged_na na_tag is_tagged_na format_tagged_na print_tagged_na
Objects exported from other packages
val_labels() `val_labels<-`() val_label() `val_label<-`() get_value_labels() set_value_labels() add_value_labels() remove_value_labels()
Get / Set value labels
remove_labels() remove_var_label() remove_val_labels() remove_user_na()
Remove variable label, value labels and user defined missing values
sort_val_labels()
Sort value labels
val_labels_to_na()
Recode value labels to NA
nolabel_to_na()
Recode values with no label to NA
drop_unused_value_labels()
Drop unused value labels
copy_labels() copy_labels_from()
Copy variable and value labels and SPSS-style missing value
update_variable_labels_with() update_value_labels_with()
Update variable/value labels with a function

Data dictionnary

Functions to look for keywords variable names / labels and create a data dictionary

Manipulating SPSS style missing values

Functions to set, manipulate and remove SPSS style missing values

Tagged missing values

Converting

Functions to convert from and to labelled classes

to_character()
Convert input to a character vector
to_factor() unlabelled()
Convert input to a factor.
to_labelled() foreign_to_labelled() memisc_to_labelled()
Convert to labelled data
update_labelled()
Update labelled data to last version

Other functions and methods

is_prefixed()
Check if a factor is prefixed
recode_if()
Recode some values based on condition
recode(<haven_labelled>)
Recode values
remove_attributes()
Remove attributes
names_prefixed_by_values()
Turn a named vector into a vector of names prefixed by values

Internal datasets for testing