R/misc.R
na_share.Rd
Returns share of NA values in vector by wrapping sum(is.na(x)) / length(x) and rounding the result
sum(is.na(x)) / length(x)
na_share(x, round = 2)
Vector
Number of digits to round result to
x <- c(NA, 1, 2) na_share(x) #> [1] 0.33