std_lgl() converts other classes to logical vectors. All but character
use as.logical(); character vectors are converted by first (optionally)
standardizing with std_chr and then assigning logical value based on the
regular expression in true, false, and na.
Arguments
- x
A vector to convert
- true
Regex patterns to consider
TRUE. Passed tostringr::str_detect(). Can be a vector of patterns.- false
Regex patterns to consider
FALSE. Passed tostringr::str_detect(). Can be a vector of patterns.- na
Regex patterns to consider
NA. Passed tostringr::str_detect(). Can be a vector of patterns.- std_chr
Whether to standardized a
charactervector before parsing- warn
Whether to warn if
characterstrings were not converted tological