Description Usage Arguments Value Examples
View source: R/yesno.as.logical.R
Convert a vector of Yes/No or Yes/NA values to logical.
1 |
v |
a character vector to convert |
a logical vector. Values of "Y" and "Yes" are converted to TRUE. All other values, including NA, are converted to FALSE.
1 2 3 4 5 | foo <- c("Y", NA, "Y", NA)
yesno.as.logical(foo)
foo <- c("Y", NA, "Y", "Yes",NA, "No", "N","something else")
yesno.as.logical(foo)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.