Skip to contents

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

Usage

miss_summary(data, order = TRUE)

Arguments

data

a dataframe

order

whether or not to order the result by n_miss

Value

a tibble of missing data summaries

Examples


s_miss <- miss_summary(airquality)
s_miss$miss_df_prop
#> [1] 0.04793028
s_miss$miss_case_table
#> [[1]]
#> # A tibble: 3 × 3
#>   n_miss_in_case n_cases pct_cases
#>            <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 × 3
#>   variable n_miss pct_miss
#>   <chr>     <int>    <num>
#> 1 Ozone        37    24.2 
#> 2 Solar.R       7     4.58
#> 3 Wind          0     0   
#> 4 Temp          0     0   
#> 5 Month         0     0   
#> 6 Day           0     0   
#> 
# etc, etc, etc.

if (FALSE) {
library(dplyr)
s_miss_group <- group_by(airquality, Month) %>% miss_summary()
s_miss_group$miss_df_prop
s_miss_group$miss_case_table
# etc, etc, etc.
}