count_na | R Documentation |
Count NA values in a vector
count_na(x, mean = FALSE)
x |
a vector with data |
mean |
a boolean, if |
returns either the sum or the mean of NA values.
Jakob Gepp
x <- c(NA, NA, 1, NaN, 0)
count_na(x)
# [1] 3
x <- c(NA, NA, 1, NaN, "0")
count_na(x)
# [1] 2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.