percent_missing: Column-wise missingness percentages

Description Usage Arguments Value Examples

View source: R/percent_missing.R

Description

A convenient way to obtain percent missingness column-wise.

Usage

1
percent_missing(df, grouping_cols = NULL, exclude_cols = NULL)

Arguments

df

A valid R 'object' for which the percentage of missing values is required.

grouping_cols

A character vector. If supplied, one can provide the columns by which to group the data.

exclude_cols

A character vector indicating columns to exclude when returning results.

Value

An object of the same class as x showing the percentage of missing values.

Examples

1
2
3
4
5
test <- data.frame(ID= c("A","B","A","B","A","B","A"), 
Vals = c(NA,25,34,NA,67,NA,45))
percent_missing(test,grouping_cols = "ID")
percent_missing(airquality)
percent_missing(airquality,exclude_cols = c("Day","Temp"))

mde documentation built on Feb. 10, 2022, 5:08 p.m.

Related to percent_missing in mde...