n_na {na.tools} | R Documentation |
Returns the number of values that are NA
n_na(x) na.howmany(x) na.n(x) pct_na(x) na.pct(x)
x |
object to count how many values are |
n_na
counts the number of missing values. na.n
is an alias in the dplyr
style.
pct_na
gives the percentage of values that are NA
n_na
returns an integer. pct_na
returns a numeric value 0-1.
x <- c( 1, NA, NA, 4:5 ) n_na(x) pct_na(x)