Learn R Programming

JWileymisc (version 1.4.1)

is.naz: Is a variable missing, non finite or zero length character?

Description

Given a vector, return TRUE or FALSE if each element is either missing (NA/NaN), non finite (e.g. infinite) or a zero length character string (only for character vectors).

Usage

is.naz(x)

Value

a logical vector

Arguments

x

A vector to identify missing / non finite or zero length strings from

Examples

Run this code
is.naz(c(1, NA, NaN))
is.naz(c(1, NA, NaN, Inf))
is.naz(c("test", "", NA_character_))

Run the code above in your browser using DataLab