istrue: Whether a vector is TRUE or FALSE, ignoring missing values

Description Usage Arguments Details Value Examples

View source: R/istrue.R

Description

Use istrue() as a wrapper for conditional statements which might be missing if one of the components is missing, but for which you want a missing value to be interpreted as FALSE.

Usage

1
2

Arguments

x

logical expression to evaluate.

Details

A convenience function to avoid unwanted NA's.

Value

A logical vector containing TRUE or FALSE, with no missing values.

Examples

1
2
3
4
istrue(c(TRUE, FALSE, NA))
# TRUE FALSE FALSE
isfalse(c(TRUE, FALSE, NA))
# FALSE TRUE FALSE

CALIBERdatamanage documentation built on Nov. 23, 2021, 3 p.m.