R/isTrue.R
isTrue.Rd
Returns TRUE for TRUE elements, FALSE for FALSE elements, and whatever is specified in na for NA items.
TRUE
FALSE
na
NA
isTrue(x, na = FALSE)
The vector to check for TRUE, FALSE, and NA values.
What to return for NA values.
A logical vector.
isTrue(c(TRUE, FALSE, NA)); #> [1] TRUE FALSE FALSE isTrue(c(TRUE, FALSE, NA), na=TRUE); #> [1] TRUE FALSE TRUE