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)

Arguments

data

data frame

include

character vector of names to include

exclude

character vector of names to exclude

Value

original data frame invisibly returned

Examples

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