powered by
Plot the pattern of missing data.
md_pattern(data, color = c(grDevices::grey(0.1), grDevices::grey(0.7)), border = grDevices::grey(0.5), plot = TRUE, pattern = FALSE, print_xaxis = TRUE, ylab = "Number of observations per pattern", print_yaxis = TRUE, legend.position = "bottom", ...)
data frame
vector of length two, that specifies the color used to indicate observed and missing (in that order)
color of the grid
logical; should the missing data pattern be plotted?
logical; should the missing data pattern be returned as matrix?
logical; should the x-axis (below the plot) and y-axis (on the right) be printed?
y-axis label
the position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector)
optional additional parameters, currently not used
See the vignette Visualizing Incomplete Data for more examples.
# NOT RUN { par(mar = c(3, 1, 1.5, 1.5), mgp = c(2, 0.6, 0)) md_pattern(wideDF) # }
Run the code above in your browser using DataLab