| anyMissing | R Documentation |
Checks if there are any missing values in an object or not.
Please use base::anyNA() instead of anyMissing(),
colAnyNAs() instead of colAnyMissings(), and
rowAnyNAs() instead of rowAnyMissings().
anyMissing(x, idxs = NULL, ...)
colAnyMissings(x, rows = NULL, cols = NULL, ..., useNames = TRUE)
rowAnyMissings(x, rows = NULL, cols = NULL, ..., useNames = TRUE)
colAnyNAs(x, rows = NULL, cols = NULL, ..., useNames = TRUE)
rowAnyNAs(x, rows = NULL, cols = NULL, ..., useNames = TRUE)
x |
A |
idxs |
A |
... |
Not used. |
rows |
A |
cols |
A |
useNames |
If |
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.
Returns TRUE if a missing value was
detected, otherwise FALSE.
Henrik Bengtsson
Starting with R v3.1.0, there is anyNA() in the base,
which provides the same functionality as anyMissing().
x <- rnorm(n = 1000)
x[seq(300, length(x), by = 100)] <- NA
stopifnot(anyMissing(x) == any(is.na(x)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.