stat_missing_values: Calculate the percentage of missing values

View source: R/stat_missing_values.r

stat_missing_valuesR Documentation

Calculate the percentage of missing values

Description

percentage of missing values for each variable.

Usage

stat_missing_values(df, plot = TRUE)

Arguments

df

A single data.frame

plot

A boolean value, if TRUE the function will plot the percentage of missing values (default = FALSE)

Value

A tibble.

Examples



vector <- c(1:10,rep(NA,4))

set.seed(123);data <-
data.frame(
 a = sample(x = vector,size = 100,replace = TRUE),
 b = sample(x = vector,size = 100,replace = TRUE),
 c = sample(x = vector,size = 100,replace = TRUE),
 d = sample(x = vector,size = 100,replace = TRUE),
 e = sample(x = vector,size = 100,replace = TRUE),
 f = sample(x = vector,size = 100,replace = TRUE)
 )

stat_missing_values(data)


vbfelix/relper documentation built on Jan. 28, 2025, 12:15 p.m.