This function tabulates nested missing data using a slightly altered (for presentation) version of
miss_var_summary
.
nested_missing_table(df)
df | A dataframe as produced by |
---|
A dataframe summarising missing data
## Code nested_missing_table#> function (df) #> { #> pct_miss <- NULL #> Variable <- NULL #> variable <- NULL #> missing <- NULL #> percent <- NULL #> reported <- NULL #> n_miss <- NULL #> df %>% miss_var_summary %>% dplyr::mutate(percent = pretty_round(pct_miss, #> digits = 1), reported = paste0(percent, " (", n_miss, #> ")")) %>% dplyr::select(variable, percent, n_miss, reported) #> } #> <bytecode: 0x55630bfcf2b0> #> <environment: namespace:ETSMissing>