Learn R Programming

Kmisc (version 0.5.0)

any_na: Check whether there are any Missing Values in a Vector

Description

This function checks whether there are any missing values in an R object. For list objects, we recurse over each entry. This is typically faster than any(is.na(x)) as we exit and return TRUE as soon as an NA is discovered.

Usage

any_na(x, how = "unlist")

Arguments

x
An R object.
how
The simplification to use if x is a list. See rapply for more details.