Takes a character vector and converts it to logicals, optionally using a vector of patterns to match against for truthy and falsy values.
A character vector.
A vector of case-insensitive truthy values to turn into TRUE.
A vector of case-insensitive falsy values to turn into FALSE.
A logical vector.
convert_str_to_logical(c('YES', 'Y', 'No', 'N', 'YES', 'yes', 'no', 'Yes', 'NO', 'Y', 'y'))
#> [1] TRUE TRUE FALSE FALSE TRUE TRUE FALSE TRUE FALSE TRUE TRUE