logical-na-handlers: Coerce NA values to 'TRUE' or 'FALSE'

logical-na-handlersR Documentation

Coerce NA values to TRUE or FALSE

Description

Coerce NA values to TRUE or FALSE

Usage

NA2TRUE(x)

NA2FALSE(x)

Arguments

x

A logical vector.

Value

x with NA values replaced with TRUE or FALSE.

Author(s)

Sercan Kahveci

Examples

fruits <- c("apples","pears",NA,"cherries")
NA2TRUE(fruits != "apples")
NA2FALSE(fruits == "pears")


Spiritspeak/skMisc documentation built on April 12, 2025, 5:40 a.m.