R/count_missing.R

count_missing.Rd

Same as sum(is.na(x)), but without the allocation.

sum(is.na(x))

count_missing(x)

vector() Supported are logical, integer, double, complex and string vectors.

vector()

(integer(1)) number of missing values.

integer(1)

count_missing(c(1, 2, NA, 4, NA)) #> [1] 2