istrue {CALIBERdatamanage}R Documentation

Whether a vector is TRUE or FALSE, ignoring missing values

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

istrue(x)
isfalse(x)

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

istrue(c(TRUE, FALSE, NA))
# TRUE FALSE FALSE
isfalse(c(TRUE, FALSE, NA))
# FALSE TRUE FALSE

[Package CALIBERdatamanage version 0.1-14 Index]