Count the number of NA

count_na(x)

Arguments

x

A vector or matrix or array

Value

An integer

Examples

count_na( c(1,NA, 2, NA, 3) )
#> [1] 2
count_na( array(1:64, dim = c(4,4,4)) )
#> [1] 0