anyMissing: Checks if there are any missing values in an object or not

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Checks if there are any missing values in an object or not.

Usage

1

Arguments

x

A vector, a list, a matrix, a data.frame, or NULL.

...

Not used.

Details

The implementation of this method is optimized for both speed and memory. The method will return TRUE as soon as a missing value is detected.

Value

Returns TRUE if a missing value was detected, otherwise FALSE.

Author(s)

Henrik Bengtsson

See Also

Starting with R v3.1.0, there is anyNA() in the base, which provides the same functionality as this function.

Examples

1
2
3
 x <- rnorm(n=1000)
 x[seq(300,length(x),by=100)] <- NA
 stopifnot(anyMissing(x) == any(is.na(x)))

matrixStats documentation built on May 2, 2019, 4:52 p.m.