plot-varrank: Visualization of varrank output

plot.varrankR Documentation

Visualization of varrank output

Description

plot method for varrank objects with multiple options.

Usage

## S3 method for class '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,
                       ...)

Arguments

x

an object of class varrank.

colsep

(optional) a logical parameter to indicate if columns should be separated from others by narrow space of color. The default is TRUE.

rowsep

(optional) a logical parameter to indicate if rows should be separated from others by narrow space of color. The default is TRUE.

sepcol

(optional) the color to use to separate rows or columns. The default is white.

sepwidth

(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).

cellnote

(optional) a logical parameter to indicate if the scores should be displayed in cells.

notecex

(optional) numeric scaling factor for scores. The default is 1.5.

notecol

(optional) character string specifying the color for cellnote text. Defaults to "black".

digitcell

(optional) integer that indicate how many digits of the scores should be displayed. The default is 3.

labelscex

the magnification factor to be used for x and y labels relative to the current setting of cex. The default is 1.2.

margins

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).

colkey

specification for the color scheme to be used. The default is a rainbow color scheme.

densadj

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.

textlines

number of lines to display relevance/redundance in the key. Default is 2.

main

an overall title for the plot. Default is none.

maincex

main magnification to be used for the plot. Default is 1.

...

additional arguments passed to image.

Details

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.

Author(s)

Gilles Kratzer

Examples

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)
}

varrank documentation built on Oct. 12, 2022, 5:06 p.m.