Learn R Programming

mark (version 0.8.2)

omit_na: Omit NA values

Description

Omit NA values

Usage

omit_na(x)

Value

x which NA values removes and two attributes of integers: na

which is the position of NA values, and valid for the position of non-NA values; empty positions reported as integer(0)

Arguments

x

A vector of values

Examples

Run this code
# Like stats::na.omit but always provides
x <- letters[1:5]
omit_na(x)
x[c(3, 5)] <- NA
omit_na(x)

Run the code above in your browser using DataLab