miss_summary performs all of the missing data helper summaries and puts them into lists within a tibble

miss_summary(data, order = FALSE)

Arguments

data

a dataframe

order

whether or not to order the result by n_miss

...

extra arguments

Value

a tibble of missing data summaries

See also

Examples

s_miss <- miss_summary(airquality) s_miss$miss_df_prop
#> [1] 0.04793028
s_miss$miss_case_table
#> [[1]] #> # A tibble: 3 x 3 #> n_miss_in_case n_cases pct_miss #> <int> <int> <dbl> #> 1 0 111 72.5 #> 2 1 40 26.1 #> 3 2 2 1.31 #>
s_miss$miss_var_summary
#> [[1]] #> # A tibble: 6 x 4 #> variable n_miss pct_miss n_miss_cumsum #> <chr> <int> <dbl> <int> #> 1 Ozone 37 24.2 37 #> 2 Solar.R 7 4.58 44 #> 3 Wind 0 0 44 #> 4 Temp 0 0 44 #> 5 Month 0 0 44 #> 6 Day 0 0 44 #>
# etc, etc, etc. library(dplyr) s_miss_group <- group_by(airquality, Month) %>% miss_summary() s_miss_group$miss_df_prop
#> [1] 0.04793028
s_miss_group$miss_case_table
#> [[1]] #> # A tibble: 11 x 4 #> Month n_miss_in_case n_cases pct_miss #> <int> <int> <int> <dbl> #> 1 5 0 24 77.4 #> 2 5 1 5 16.1 #> 3 5 2 2 6.45 #> 4 6 0 9 30 #> 5 6 1 21 70 #> 6 7 0 26 83.9 #> 7 7 1 5 16.1 #> 8 8 0 23 74.2 #> 9 8 1 8 25.8 #> 10 9 0 29 96.7 #> 11 9 1 1 3.33 #>
# etc, etc, etc.