anyMissing {matrixStats} | R Documentation |
Checks if there are any missing values in an object or not.
anyMissing(x, ...)
x |
A vector , a list , a matrix , a data.frame , or NULL . |
... |
Not use. |
The implementation of this method is optimized for both speed and memory.
The method will return TRUE
at the first detected missing value.
Returns TRUE
if a missing value was detected, otherwise FALSE
.
Henrik Bengtsson (http://www.braju.com/R/)
x <- rnorm(n=1000) x[seq(300,length(x),by=100)] <- NA stopifnot(anyMissing(x) == any(is.na(x)))