-
Notifications
You must be signed in to change notification settings - Fork 87
/
plot_missing.Rd
59 lines (50 loc) · 1.82 KB
/
plot_missing.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_missing.r
\name{plot_missing}
\alias{plot_missing}
\title{Plot missing value profile}
\usage{
plot_missing(
data,
group = list(Good = 0.05, OK = 0.4, Bad = 0.8, Remove = 1),
group_color = list(Good = "#1B9E77", OK = "#E6AB02", Bad = "#D95F02", Remove =
"#E41A1C"),
missing_only = FALSE,
geom_label_args = list(),
title = NULL,
ggtheme = theme_gray(),
theme_config = list(legend.position = c("bottom"))
)
}
\arguments{
\item{data}{input data}
\item{group}{missing profile band taking a list of group name and group upper bounds. Default is \code{list("Good" = 0.05, "OK" = 0.4, "Bad" = 0.8, "Remove" = 1)}.}
\item{group_color}{bar color list for each of the group. Default is \code{list("Good" = "#1B9E77", "OK" = "#E6AB02", "Bad" = "#D95F02", "Remove" = "#E41A1C")}.}
\item{missing_only}{plot features with missing values only? Default is \code{FALSE}.}
\item{geom_label_args}{a list of other arguments to \link{geom_label}}
\item{title}{plot title}
\item{ggtheme}{complete ggplot2 themes. The default is \link{theme_gray}.}
\item{theme_config}{a list of configurations to be passed to \link{theme}.}
}
\value{
invisibly return the ggplot object
}
\description{
This function returns and plots frequency of missing values for each feature.
}
\examples{
plot_missing(airquality)
plot_missing(airquality, missing_only = TRUE)
## Customize band
plot_missing(airquality, group = list("B1" = 0, "B2" = 0.06, "B3" = 1))
plot_missing(airquality, group = list("Awesome!" = 0.2, "Oh no!" = 1),
group_color = list("Awesome!" = "green", "Oh no!" = "red"))
## Shrink geom_label size
library(ggplot2)
plot_missing(airquality, geom_label_args = list("size" = 2,
"label.padding" = unit(0.1, "lines")))
}
\seealso{
\link{profile_missing}
}
\keyword{plot_missing}