powered by
Computes the coverage percentage for the column/variable of interest.
coverage_pct(df, by, x, w = NULL, limit = NULL)
Data frame containing the number of valid (i.e. non-missing) observations for the variable of interest.
(data frame) Data to analyse.
(string vector) Variable(s) used to tabulate the variable of interest.
(string) Variable of interest for which to compute the number of valid (i.e. non-missing) observations.
(string) Vector of weights.
(numeric) Threshold below which the value will be TRUE.
data(df_pisa18) data(df_talis18) coverage_pct(df = df_pisa18, by = "cnt",x = "st003d03t") coverage_pct(df = df_talis18, by = "cntry",x = "tt3g01", w = "TCHWGT")
Run the code above in your browser using DataLab