Description Usage Arguments Details Value Author(s) See Also Examples
A missing value plot shows the counts or proportions of missing values in each variable. It is essentially a stacked bar plot, i.e. a bar plot of variables split by the logical vectors of missingness of observations.
1 |
vars |
variables to show in the plot: a character vector of variable
names, or a numeric vector of column indices, or a two-sided formula like
|
... |
arguments passed to |
data |
a mutaframe created by |
horizontal |
|
standardize |
logical: whether to standardize the height of each bar to 1 |
As usual, common interactions are defined in common_key_press
.
Brushing on a missing value plot has a slightly different meaning with
brushing other types of plots: if a rectangle is brushed in a missing value
plot, all rows in the orginal data in which the current variable is brushed
(i.e. either missing or non-missing) are brushed; on the other hand, the
brushed rows in the original data will also be reflected in the missing value
plot.
This plot is built upon the bar plot qbar
.
A missing value plot
Heike Hofmann and Yihui Xie
Other plots: qbar
; qboxplot
;
qdensity
; qhist
,
qspine
; qparallel
;
qtime
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(cranvas)
## BRFSS data
qbrfss <- qdata(brfss)
qmval(names(brfss)[40:50], data = qbrfss)
qmval(51:68, data = qbrfss)
qmval(~poorhlth + fruit + greensal, data = qbrfss)
qparallel(100:110, data = qbrfss)
## TAO data
data(tao, package = "tourr")
qtao <- qdata(tao)
qmval(~., data = qtao)
qmval(~., data = qtao, horizontal = FALSE, standardize = FALSE,
main = "horizontal plot with counts")
qscatter(longitude, latitude, data = qtao)
cranvas_off()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.