Skip to contents

Function to generate a tile plot exploring the missing values for all observations across all variables of a dataframe.

Usage

plot_miss_vis(
  x,
  facet = NULL,
  col_vec = c("#6a040f", "#cce3de"),
  y_axis_text_size = 8
)

Arguments

x

a dataframe

facet

a character value of variable to facet the graph

col_vec

a vector of length 2 specifying the color for Missing and Present values respectively

y_axis_text_size

a nuemric value for the size of the y axis text

Value

a ggplot tile graph displaying the missing/present values for all variables of the dataframe

Examples

# Use simulated measles data

suppressMessages(library(dplyr))

epivis::moissala_measles |>
  filter(site %in% c("Moïssala Hospital", "Bouna Hospital")) |>
  plot_miss_vis(facet = "site")