This function takes a single column of data and converts the values based on the overall data tibble cross referenced with a nested section of the metadata tibble.
case_when logic helps determine whether the value is a coalesced singular
value or a user-specified one via multi_value_label or values_fill.
convert_checkbox_vals(
metadata,
.new_value,
data_tbl,
raw_or_label,
multi_value_label,
values_fill
)A nested portion of the overall metadata tibble
The new column values made by combine_checkboxes()
The data tibble from the original supertibble
Either 'raw' or 'label' to specify whether to use raw coded values or labels for the options. Default 'label'.
A string specifying the value to be used when multiple checkbox fields are selected. Default "Multiple".
Value to use when no checkboxes are selected. Default NA.
This function is used in conjunction with pmap().