naaccr_boolean {naaccr} | R Documentation |
Interpret NAACCR-style booleans
Description
Interpret NAACCR-style booleans
Usage
naaccr_boolean(flag, false_value = c("0", "1"))
Arguments
flag |
Character vector of flags. |
false_value |
The flag value to interpret as |
Value
A logical
vector with the interpreted values of flag
.
Any original values not seen as TRUE
or FALSE
are converted
to NA
.
Examples
x <- c("0", "1", "2", "9", NA)
naaccr_boolean(x)
naaccr_boolean(x, false_value = "1")
[Package naaccr version 2.0.2 Index]