summarize_missing_values.Rd
It counts the number of missing (i.e.,`NA`) values in each column.
summarize_missing_values(
data,
cols = dplyr::everything(),
group = NULL,
verbose = TRUE,
return_result = FALSE
)
A data.frame or a data.frame extension (e.g. a tibble).
Columns that need to be checked for missing values. See `dplyr::dplyr_tidy_select` for available options.
character. count missing values by group.
default is `TRUE`. Print the missing value data frame
default is `FALSE`. Return `data_frame` if set to yes
An object of the same type as .data. that specified the number of NA values of the columns (only when `return_result = TRUE`)
df1 = data.frame(col1 = c(1,2,3),col2 = c(1,NA,3),col3 = c(1,2,NA))
summarize_missing_values(df1,everything())
#> # A tibble: 3 × 5
#> var_name miss_count non_miss_count miss_perc non_miss_perc
#> <chr> <int> <int> <chr> <chr>
#> 1 col1 0 3 0% 100%
#> 2 col2 1 2 33.333% 66.667%
#> 3 col3 1 2 33.333% 66.667%