powered by
The count of missing values in an atomic vector, equivalent to to sum(is.na(x)).
sum(is.na(x))
sum_isna(x, do_anyNA = TRUE, nThread = getOption("hutilscpp.nThread", 1L))
An atomic vector.
Should anyNA(x) be executed before an attempt to count the NA's in x one-by-one? By default, set to TRUE, since it is generally quicker. It will only be slower when NA is rare and occurs late in x.
anyNA(x)
NA
x
TRUE
Ignored silently if nThread != 1.
nThread != 1
nThread
Number of threads to use.
sum_isna(c(1:5, NA)) sum_isna(c(NaN, NA)) # 2 from v0.4.0 (Sep 2020)
Run the code above in your browser using DataLab