An overview table of missingness patterns generated using md_pattern().

codebook_missingness(results, indent = "##")

Arguments

results

a data frame

indent

add # to this to make the headings in the components lower-level. defaults to beginning at h2

Examples

data("bfi") codebook_missingness(bfi)
#> #> #> #> #> ### Missingness report #> #> Among those who finished the survey. Only variables that have missings are shown. #> #> #> ```r #> if ( exists("ended", results) && #> exists("expired", results)) { #> finisher_results <- dplyr::filter(results, !is.na(.data$ended)) #> } else { #> finisher_results <- results #> warning("Could not figure out who finished the surveys, because the ", #> "variables expired and ended were missing.") #> } #> if (length(md_pattern)) { #> pander::pander(md_pattern) #> } #> ``` #> #> #> ----------------------------------------------------- #> description expired var_miss n_miss #> ----------------------- --------- ---------- -------- #> Missings per variable 28 28 28 #> -----------------------------------------------------