userfriendlyscience (version 0.7.1)

isTrue: 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)

Arguments

x

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

na

What to return for NA values.

Value

A logical vector.

Examples

Run this code
# NOT RUN {
isTrue(c(TRUE, FALSE, NA));  
isTrue(c(TRUE, FALSE, NA), na=TRUE);
# }

Run the code above in your browser using DataCamp Workspace