Maps specific frequency categories to numeric values, with error handling for invalid categories.
Examples
map_freq_to_numeric(data.frame(freq = c("Not at all", "Several days")), "freq")
#> [1] 0 1
Maps specific frequency categories to numeric values, with error handling for invalid categories.
map_freq_to_numeric(data.frame(freq = c("Not at all", "Several days")), "freq")
#> [1] 0 1