Learn R Programming

JWileymisc (version 1.4.1)

naz.omit: Missing and Zero Character Omit

Description

Given a vector, exclude any missing values, not a number values, non finite values, and if a character class, any zero length strings.

Usage

naz.omit(x)

Value

a vector with missing/non finite/zero length strings omitted

Arguments

x

A vector to exclude missing, non finite or zero length strings from

Examples

Run this code
## stats na.omit
stats::na.omit(c(1, NA, NaN))
stats::na.omit(c("test", "", NA_character_))

naz.omit(c(1, NA, NaN))
naz.omit(c(1L, NA))
naz.omit(c(1L, NA, Inf))
naz.omit(c("test", "", NA_character_))

Run the code above in your browser using DataLab