Provide a tidy table of the number of cases with 0, 1, 2, up to n, missing values and the proportion of the number of cases those cases make up.

miss_case_table(data)

Arguments

data

a dataframe

Value

a dataframe

See also

Examples

miss_case_table(airquality)
#> # 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
library(dplyr) airquality %>% group_by(Month) %>% miss_case_table()
#> # 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