Pass a data frame and the missing pattern of all columns in the data frame. The data frame is returned unmodified.
count_na(data, include = NULL, exclude = NULL)
data frame
character vector of names to include
character vector of names to exclude
original data frame invisibly returned
trial %>% count_na()
#> TRUE = "Available", FALSE = "Not Available"
#>
#> trt age marker stage grade response death ttdeath n
#> 1 TRUE FALSE TRUE TRUE TRUE FALSE TRUE TRUE 1
#> 2 TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE 10
#> 3 TRUE TRUE FALSE TRUE TRUE TRUE TRUE TRUE 10
#> 4 TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE 6
#> 5 TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 173