util_count_missing {assertions} | R Documentation |
Count the number of missing values in a vector
Description
This function returns the number of missing values (NA
) in the input vector.
Usage
util_count_missing(x)
Arguments
x |
A vector. |
Value
The number of missing values in the input vector.
Examples
if(interactive()){
util_count_missing(c(1, 2, 3)) # returns 0
util_count_missing(c(1, NA, 2)) # returns 1
}
[Package assertions version 0.1.0 Index]