Provide a data.frame containing each case (row), the number and percent of missing values in each case.

miss_case_cumsum(data)

Arguments

data

a dataframe

Value

a tibble containing the number and percent of missing data in each case

Examples

miss_case_cumsum(airquality)
#> # A tibble: 153 x 3 #> case n_miss n_miss_cumsum #> <int> <int> <int> #> 1 1 0 0 #> 2 2 0 0 #> 3 3 0 0 #> 4 4 0 0 #> 5 5 2 2 #> 6 6 1 3 #> 7 7 0 3 #> 8 8 0 3 #> 9 9 0 3 #> 10 10 1 4 #> # … with 143 more rows
library(dplyr) airquality %>% group_by(Month) %>% miss_case_cumsum()
#> # A tibble: 153 x 4 #> # Groups: Month [5] #> Month case n_miss n_miss_cumsum #> <int> <int> <int> <int> #> 1 5 1 0 0 #> 2 5 2 0 0 #> 3 5 3 0 0 #> 4 5 4 0 0 #> 5 5 5 2 2 #> 6 5 6 1 3 #> 7 5 7 0 3 #> 8 5 8 0 3 #> 9 5 9 0 3 #> 10 5 10 1 4 #> # … with 143 more rows