Skip to contents

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)