Compute completion rate
compute_completion_rate.Rd
compute_completion_rate()
computes the percentage of non-missing values.
Arguments
- data
A tibble.
- id_vars
A character vector of variable names indicating the groups over which counting of the
NA
should be performed. Default toNULL
indicating that no groups should be used.- digits
The
digits
argument passed tosignif()
.
Examples
if (FALSE) {
tbl <- build_tbl(
"tb",
year = 2019,
estimated = "who_estimates.e_inc_num",
notified = "who_notifications.c_newinc",
vars = extract_vars("tb")
)
compute_completion_rate(tbl, id_vars = c("year", "is_hbc"))
cars_df <- tibble::as_tibble(mtcars, rownames = "car_name")
compute_completion_rate(cars_df, id_vars = NULL)
}