Summarizes missing values per column of a tidy data frame: the number and
percentage of missing entries. The row dimension is covered by
plot_na_heatmap().
Usage
na_summary(data, .cols = dplyr::everything())Arguments
- data
A data frame.
- .cols
<
tidy-select> Columns to summarize; defaults to all columns.
Examples
d = data.frame(x = c(1, NA, 3), y = c(NA, NA, 2))
na_summary(d)
#> # A tibble: 2 × 3
#> variable n_missing pct_missing
#> <chr> <int> <dbl>
#> 1 x 1 0.333
#> 2 y 2 0.667