na2false: Set NAs to FALSE

Description Usage Arguments Value Author(s) Examples

View source: R/data.R

Description

Takes a logical vector as input and set all NAs to FALSE. This may happens when comparison is done on NA values.

Usage

1

Arguments

x

a logical vector.

Value

A logical vector without NAs.

Author(s)

Diego Diez

Examples

1
2
3
4
5
6
7
## Not run: 
    a <- c(1, 2, 3, NA, 5)
    b <- c(5, 4, NA, 2, 1)
    sel <- a > b
    sel <- na2false(sel)

## End(Not run)

codelink documentation built on Nov. 8, 2020, 8:19 p.m.