plot
method for varrank
objects with multiple options.
# S3 method for varrank
plot(x,
## block separation
colsep = TRUE,
rowsep = TRUE,
sepcol ="white",
sepwidth=c(0.005,0.005), ## cell labeling
cellnote = TRUE,
notecex = 1.5,
notecol = "black",
digitcell = 3,
## Row/Column Labelling
margins = c(6, 6, 4, 2),
labelscex = 1.2,
## color key + density info
colkey = NULL,
densadj = 0.25,
textlines = 2,
## plot labels
main = NULL,
maincex = 1,
...)
an object of class varrank
.
(optional) a logical parameter to indicate if columns should be separated from others by narrow space of color. The default is TRUE
.
(optional) a logical parameter to indicate if rows should be separated from others by narrow space of color. The default is TRUE
.
(optional) the color to use to separate rows or columns. The default is white
.
(optional) Vector of length 2 giving the width
(colsep) or height (rowsep) the separator box drawn by colsep and
rowsep as a function of the width (colsep) or height (rowsep) of a
cell. The defaults is c(0.005, 0.005)
.
(optional) a logical parameter to indicate if the scores should be displayed in cells.
(optional) numeric scaling factor for scores
. The default is 1.5.
(optional) character string specifying the color for
cellnote
text. Defaults to "black".
(optional) integer that indicate how many digits of the scores
should be displayed. The default is 3.
the magnification factor to be used for x and y labels relative to the current setting of cex. The default is 1.2.
numerical vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot. The default is c(6, 6, 4, 2).
specification for the color scheme to be used. The default is a rainbow color scheme.
numeric scaling value for tuning the kernel width when
a density plot is drawn on the color key. (See the adjust
parameter for the density
function for details.) Defaults is
0.25.
number of lines to display relevance/redundance
in the key. Default is 2.
an overall title for the plot. Default is none.
main magnification to be used for the plot. Default is 1.
additional arguments passed to image.
Gilles Kratzer
This plot
method for varrank
objects provides an
extensible framework for the visualization varrank
output analysis. The
user is allowed to specify block separations, display of scores and the color scheme to be used. The other parameters give a full control on the output. The final rendering depends on the algorithm
used. For a `forward` search the key density is on the upper right corner and for a `backward`
search the key density is in the bottom left corner.
The default color scheme is continuous heat color from blue to red. A
popular alternative for creating color palettes is RColorBrewer,
https://cran.r-project.org/package=RColorBrewer.
This plot
method is very similar to the heatmap.2
function from gplots, https://cran.r-project.org/package=gplots.
if (requireNamespace("mlbench", quietly = TRUE)) {
library(mlbench)
data(PimaIndiansDiabetes)
##forward search for all variables
out <- varrank(data.df = PimaIndiansDiabetes,
method = "estevez",
variable.important = "diabetes",
discretization.method = "sturges",
algorithm = "forward",scheme="mid")
##default output
plot(x = out)
##typical plot for high dimensional datasets
plot(x = out, colsep = FALSE, rowsep = FALSE, cellnote = FALSE)
}
Run the code above in your browser using DataLab