Learn R Programming

clinpubr (version 1.1.1)

na2false: Replace NA values with FALSE

Description

Replace NA values with FALSE in logical vectors. For other vectors, the behavior relies on R's automatic conversion rules.

Usage

na2false(x)

Value

A vector with NA values replaced by FALSE.

Arguments

x

A vector.

Examples

Run this code
na2false(c(TRUE, FALSE, NA, TRUE, NA))
na2false(c(1, 2, NA))

Run the code above in your browser using DataLab