scattmatrixMiss(x, delimiter = NULL, highlight = NULL,
selection = c("any","all"), plotvars = NULL, col = c("skyblue",
"red","orange"), alpha = NULL, pch = c(1,3), lty = par("lty"),
diagonal = c("density","none"), interactive = TRUE, ...)TKRscattmatrixMiss(x, delimiter = NULL, highlight = NULL,
selection = c("any","all"), plotvars = NULL, col = c("skyblue",
"red","orange"), alpha = NULL, ..., hscale = NULL,
vscale = NULL, TKRpar = list())
data.frame
.x
needs
to have colnames
). If given, it is used to determine the correspoNULL
(the default), all variables
are used for highlighting."any"
(highlighting of missing/imputed values in any of the highlight
variables) and
NULL
(the default), all variables are plotted.NULL
. This can be used to
prevent overplotting.diagonal="density"
). The
second line type is used for the highlighted observations. If a
single value is supplied, it i"density"
(density plots
for non-highlighted and highlighted observations) and "none"
.scattmatrixMiss
, further arguments and
graphical parameters to be passed to pairsVIM
.
par("oma")
will be set appropriately unless supplied (see
par
).scattmatrixMiss
uses pairsVIM
with a panel function
that allows highlighting of missing/imputed values.
If interactive=TRUE
, the variables to be used for highlighting
can be selected interactively. Observations with missing/imputed values in any
or in all of the selected variables are highlighted (as determined by
selection
). A variable can be added to the selection by clicking
in a diagonal panel. If a variable is already selected, clicking on the
corresponding diagonal panel removes it from the selection. Clicking
anywhere else quits the interactive session.
The graphical parameter oma
will be set unless supplied as an
argument.
TKRscattmatrixMiss
behaves like scattmatrixMiss
, but uses
tkrplot
to embed the plot in a Tcl/Tk
window. This is useful if the number of variables is large, because
scrollbars allow to move from one part of the plot to another.pairsVIM
, marginmatrix
data(sleep, package = "VIM")
## for missing values
x <- sleep[, 1:5]
x[,c(1,2,4)] <- log10(x[,c(1,2,4)])
scattmatrixMiss(x, highlight = "Dream")
## for imputed values
x_imp <- kNN(sleep[, 1:5])
x_imp[,c(1,2,4)] <- log10(x_imp[,c(1,2,4)])
scattmatrixMiss(x_imp, delimiter = "_imp", highlight = "Dream")
Run the code above in your browser using DataLab