Skip to contents

Takes a data frame and displays the location of missing data. The missings can be clustered and be displayed together.

Usage

plotMiss(
  x,
  main = NULL,
  cluster = FALSE,
  col = "deeppink4",
  bg = fade("navajowhite3", 0.3),
  stamp = .useTheme,
  ...
)

Arguments

x

a data.frame to be analysed.

main

main title. NULL (default) draws none, unless the theme sets autoTitle = TRUE (see theme); the title is then derived from the expression passed as x. "", NA or FALSE always suppress it and compact the top margin; any other string is used as given.

cluster

logical, defining if the missings should be clustered. Default is FALSE.

col

the colour of the missings.

bg

the background colour of the plot.

stamp

controls the corner stamp. .useTheme (default) resolves to getTheme()$stamp. TRUE/FALSE/ NULL, a string, or a named list for stamp().

...

the dots are passed to plot().

Value

if cluster is set to TRUE, the new order will be returned invisibly.

Details

A graphical display of the position of the missings can be help to detect dependencies or patterns within the missings.

Note

Following an idea of Henk Harmsen henk@carbonmetrics.com

Examples


plotMiss(airquality, main="Missing data (in orignal order)")

plotMiss(airquality, main="Missing data (clustered)", cluster=TRUE)