plot_pattern {ggmice}R Documentation

Plot the missing data pattern of an incomplete dataset

Description

Plot the missing data pattern of an incomplete dataset

Usage

plot_pattern(
  data,
  vrb = "all",
  square = TRUE,
  rotate = FALSE,
  cluster = NULL,
  npat = NULL,
  caption = TRUE
)

Arguments

data

An incomplete dataset of class data.frame or matrix.

vrb

String, vector, or unquoted expression with variable name(s), default is "all".

square

Logical indicating whether the plot tiles should be squares, defaults to squares to mimick mice::md.pattern().

rotate

Logical indicating whether the variable name labels should be rotated 90 degrees.

cluster

Optional character string specifying which variable should be used for clustering (e.g., for multilevel data).

npat

Optional numeric input specifying the number of missing data patterns to be visualized, defaults to all patterns.

caption

Logical indicating whether the figure caption should be displayed.

Value

An object of class ggplot2::ggplot.

Examples

plot_pattern(mice::nhanes)

[Package ggmice version 0.1.0 Index]