Skip to contents

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

Usage

count_missing(x)

Arguments

x

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

Value

(integer(1)) number of missing values.

Examples

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