count_NA {missMethods} | R Documentation |
Count the number of NA
s
Description
Count the number of NA
values in a vector, matrix or data frame
Usage
count_NA(x, type = "default")
Arguments
x |
a vector, matrix or data frame, in which |
type |
How to count the
|
Value
The number of missing values.
Examples
count_NA(c(1, NA, 3, NA, 5, NA))
test_df <- data.frame(X1 = rep(c(1, NA), 5), X2 = c(1:9, NA))
count_NA(test_df)
count_NA(test_df, "cols") # the default
count_NA(test_df, "rows")
count_NA(test_df, "all")
[Package missMethods version 0.4.0 Index]