ggmissing {ggplot2} | R Documentation

## Missing values plot

### Description

Create a plot to illustrate patterns of missing values

### Usage

    ggmissing(data, avoid="stack", order=TRUE, missing.only = TRUE)

### Arguments

`data` | data.frame
`avoid` | whether missings should be stacked or dodged, see `geom_bar` for more details
`order` | whether variable should be ordered by number of missings
`missing.only` | whether only variables containing some missing values should be shown

### Details

The missing values plot is a useful tool to get a rapid overview of the number of missings in a dataset. It's strength is much more apparent when used with interactive graphics, as you can see in Mondrian (http://rosuda.org/mondrian) where this plot was copied from.

### Author(s)

Hadley Wickham <h.wickham@gmail.com>

### See Also

`ggstructure`, `ggorder`

### Examples

    mmissing <- movies
    mmissing[sample(nrow(movies), 1000), sample(ncol(movies), 5)] <- NA
    ggmissing(mmissing)
    ggmissing(mmissing, order=FALSE, missing.only = FALSE)
    ggmissing(mmissing, avoid="dodge") + scale_y_sqrt()
    ggmissing(mmissing) + scale_y_log10(limits=c(1, NA))

[Package ggplot2 version 0.5.5 Index]