Closed zkasper4life closed 7 months ago
I decided to take a more indirect route; required a few more steps, but still gave the results I anticipated:
dict %>%
mutate(field_value = strsplit(select_choices_or_calculations, "\\s\\|\\s")) %>%
unnest(field_value) %>%
separate(field_value, c("field_value","value_label"), sep = ",\\s", remove = F)
I am trying to re-create the data dictionary by modifying all of the checkbox (and other piped value) fields. The
checkbox_choices
function works perfectly when I try to perform on a single value in the dictionary:But when I try and apply this to all values in the
field_value
column, I am yelled at:Any advice? For the record, the column
field_value
contains hundreds of values, so I'd very much like looping through the function compared to the alternative.