isTRUENA | R Documentation |
These functions work exactly the same as x == TRUE
and x == FALSE
but by default return FALSE
for cases that are NA
.
isTRUENA(x, ifNA = FALSE)
isFALSENA(x, ifNA = FALSE)
x |
Logical, or a condition that evaluates to logical, or a vector of logical values or conditions to evaluate. |
ifNA |
Logical, value to return if the result of evaluating |
Logical or value specified in ifNA
.
isFALSENA()
: Vectorized test for truth robust to NA
isTRUE
, isFALSE
, TRUE
, logical
x <- c(TRUE, TRUE, FALSE, NA)
x == TRUE
isTRUENA(x)
x == FALSE
isFALSENA(x)
isTRUENA(x, ifNA = Inf)
# note that isTRUE and isFALSE are not vectorized
isTRUE(x)
isFALSE(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.