forked from tidyverse/ggplot2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathggmissing.Rd
40 lines (36 loc) · 1.09 KB
/
ggmissing.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
\name{ggmissing}
\alias{ggmissing}
\title{Create a plot to illustrate patterns of missing values.}
\usage{
ggmissing(data, avoid = "stack", order = TRUE,
missing.only = TRUE)
}
\arguments{
\item{data}{input data.frame}
\item{avoid}{whether missings should be stacked or
dodged, see \code{\link{geom_bar}} for more details}
\item{order}{if \code{TRUE}, order variables by number of
missings}
\item{missing.only}{if \code{TRUE}, only display
variables with some missing data}
}
\description{
The missing values plot is a useful tool to get a rapid
overview of the number and pattern of missing values in a
dataset. Its strength is much more apparent when used
with interactive graphics, as you can see in Mondrian
(\url{http://rosuda.org/mondrian}) where this plot was
copied from.
}
\examples{
\dontrun{
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()
}
}
\seealso{
\code{\link{ggstructure}}, \code{\link{ggorder}}
}