Learn R Programming

BMisc (version 1.4.9)

TorF: TorF

Description

A function to replace NA's with FALSE in vector of logicals

Usage

TorF(cond, use_isTRUE = FALSE)

Value

logical vector

Arguments

cond

a vector of conditions to check

use_isTRUE

whether or not to use a vectorized version of isTRUE. This is generally slower but covers more cases.

Examples

Run this code
TorF(c(TRUE, NA, FALSE)) ## NA becomes FALSE

Run the code above in your browser using DataLab