Learn R Programming

ksformat (version 0.3.5)

is_missing: Check if Value is Missing

Description

Element-wise check for missing values including NA and NaN. Optionally treats empty strings as missing.

Usage

is_missing(x)

Value

Logical vector. NULL input returns logical(0).

Arguments

x

Value to check

Examples

Run this code
is_missing(NA)          # TRUE
is_missing(NaN)         # TRUE
is_missing("")          # TRUE
is_missing("text")      # FALSE
is_missing(c(1, NA, NaN)) # FALSE TRUE TRUE

Run the code above in your browser using DataLab