R/clean.R
recode_yn.Rd
Converts various representations of yes/no (numeric, text, case-insensitive) to logical TRUE/FALSE values.
recode_yn(x)
A vector of yes/no values (numeric or character).
A logical vector, with NA for unrecognized values.
recode_yn(c(1, 2, "yes", "no", NA)) #> [1] TRUE FALSE TRUE FALSE NA