ggmissing {ggplot}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 ggbar 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)
pscontinuous(ggmissing(mmissing, avoid="dodge"), "y", transform=trans_sqrt, range=c(0, NA))
pscontinuous(ggmissing(mmissing), "y", transform=trans_log10, range=c(1, NA))

[Package ggplot version 0.4.2 Index]