count_missing_values: Count missing values for each variable in the given list

Description Usage Arguments Value Examples

View source: R/dailyLogicChecks.R

Description

List the number of missing values for each variable in the given list of variables in a tidy format.

Usage

1
count_missing_values(df, variable_names_vec = "all")

Arguments

df

dataset(tibble/data.frame) object from which the variable names are chosen.

variable_names_vec

a vector of variable names. For each of these variables, the function calculates the number of missing values present in their list of values. If you want to see missing values for all variables (columns) in the dataset, set variable_names_vec = "all". Also, the default for this argument is "all".

Value

a tibble containing the list of column (variable) names (for the underlying dataset df) and for each of those column names, it shows the number of values that are missing in that column. It also shows a column that displays the percentage (of total missing values) of values missing in each column.

Examples

1
2
3
count_missing_values(df = dataObj, variable_names_vec = c("a", "b"))
count_missing_values(df = dataObj, variable_names_vec = "all")
count_missing_values(df = dataObj) # uses default \code{variable_names_vec = "all"}

AarshBatra/econR documentation built on Dec. 17, 2021, 6:45 a.m.