View source: R/data-item-interpreting.R
naaccr_boolean | R Documentation |
Interpret NAACCR-style booleans
naaccr_boolean(flag, false_value = c("0", "1"))
flag |
Character vector of flags. |
false_value |
The flag value to interpret as |
A logical
vector with the interpreted values of flag
.
Any original values not seen as TRUE
or FALSE
are converted
to NA
.
x <- c("0", "1", "2", "9", NA)
naaccr_boolean(x)
naaccr_boolean(x, false_value = "1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.