Skip to contents

All functions

add_binaries_from_set()
Add as many binaries than input columns, taking the value 1 if value in each column is inside a set a values
add_hesper_cat()
function that creates different composite indicators from hesper items for each type of hesper items (at least one item as serious problem from the category, number of items as serious problem from the category, proportion of items as serious problem from the category, overall proportion of items as serious problem from the category compared to all other items)
add_hesper_main()
function that compute for each respondent the number of selected items, number of applicable items and collapse the three ordered priorities into one select multiple column
add_top3()
Add a new column with the top three priorities
check_dupes()
Check for duplicate values
check_sv_l()
Check if lists of subset are in the right format
check_vars_class_in_df()
Check if variables are of any given class(es)
check_vars_in_df()
Check if variables are in data frame
check_vars_in_set()
Stop statement values are not in set
clean_top_priorities_subset()
This function replaces the top 1/2/3 binary columns (which correspond to choices) with NA for a specified subset of the data.
drop_undefined()
Drop undefined values in a data frame
expand_bin()
Expand a variable into binary indicators
hesper_dat
Some Hesper dummy data
is_not_empty()
Check if a vector is not empty, i.e. not null, positive length and not filled with NA
replace_na_subset()
Replace binary columns with NA for a subset of the data
sum_vals_across()
Sum variables in a set of values
warn_removal()
Warn and remove existing variables from a data frame
warn_replace()
Warn and replace existing variables in a data frame
warn_var_msg()
Warn message
warn_var_no_vals()
Warn if a variable contains no values in a set