powered by
Provides a useful way to sort the variables(columns) according to their missingness.
sort_by_missingness(df, sort_by = "counts", descending = FALSE, ...)
A `data.frame` object sorted by number/percentage of missing values
A data.frame object
One of counts or percents. This determines whether the results are sorted by counts or percentages.
Logical. Should missing values be sorted in decreasing order ie largest to smallest? Defaults to FALSE.
Other arguments to specific functions. See "See also below"
get_na_counts percent_missing
get_na_counts
percent_missing
sort_by_missingness(airquality, sort_by = "counts") # sort by percents sort_by_missingness(airquality, sort_by="percents") # descending order sort_by_missingness(airquality, descend = TRUE)
Run the code above in your browser using DataLab