cor.heat: Produce a correlation matrix as a heatmap.

Description Usage Arguments Details Examples

Description

cor.heat(Mat, coloramp, textsize, scaletext, abs.val=TRUE, ...)

Usage

1
2
cor.heat(Mat, coloramp, textsize = 1, scaletext = 1, abs.val = TRUE,
  Names = NULL, ...)

Arguments

Mat

is a matrix resulting from correlations

coloramp

is a colorRampPalette() palette, e.g., coloramp = colorRampPalette(c('red','blue'))

textsize

is the multiplier for text size of labels and value size

scaletext

is the multiplier for the text size of legend labels

abs.val

logical; if true, absolute values of correlation coefficient (x100) are displayed

Names

can be supplied to replace the existing variable names

...

further arguments to be passed to color2D.matplot, in particular show.values=TRUE and border=NA

Details

axis labels are at top and left hand side, and scale is on right hand side, so make suitable margin sizes. Essentially, this function is a convenience wrapper for color2D.matplot() from plotrix.

Examples

1
2
3
4
5
6
data(mtcars)
CorMT = cor(mtcars, method="spearman")
CLS = colorRampPalette(c("blue","white","darkred"))
x11()
par(mar=c(1,4,4,3))
cor.heat(CorMT, CLS, textsize=1.1, scaletext=1.3,show.values=TRUE, border=NA)

helophilus/ColsTools documentation built on May 30, 2019, 4:03 p.m.