n_missing.Rd
Returns the number of missings in a variable or dataset. If missings are an explicit level in a factor variable, this function defaults to reporting them anyway.
n_missing(x, exclude = NA)
x | variable |
---|---|
exclude | only needed for factors. defaults to NA (count level=missing as missing), setting to 0 allows you to count level=missing as nonmissing |
#> [1] 10#> [1] 0n_missing(beaver1$activ)#> [1] 10n_missing(beaver1$activ, exclude = NULL)#> [1] 0