Learn R Programming

ufs (version 0.5.12)

isTrue: More flexible version of isTRUE

Description

Returns TRUE for TRUE elements, FALSE for FALSE elements, and whatever is specified in na for NA items.

Usage

isTrue(x, na = FALSE)

Value

A logical vector.

Arguments

x

The vector to check for TRUE, FALSE, and NA values.

na

What to return for NA values.

Examples

Run this code
isTrue(c(TRUE, FALSE, NA));
isTrue(c(TRUE, FALSE, NA), na=TRUE);

Run the code above in your browser using DataLab