Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotCor

Red and Green Color Image of Correlation Matrix


Description

This function produces a red and green color image of a correlation matrix using an RGB color specification. Increasingly positive correlations are represented with reds of increasing intensity, and increasingly negative correlations are represented with greens of increasing intensity.

Usage

plotCor(x, new=FALSE, nrgcols=50, labels=FALSE, labcols=1, title="", ...)

Arguments

x

a matrix of numerical values.

new

If new=F, x must already be a correlation matrix. If new=T, the correlation matrix for the columns of x is computed and displayed in the image.

nrgcols

the number of colors (>= 1) to be used in the red and green palette.

labels

vector of character strings to be placed at the tickpoints, labels for the columns of x.

labcols

colors to be used for the labels of the columns of x. labcols can have either length 1, in which case all the labels are displayed using the same color, or the same length as labels, in which case a color is specified for the label of each column of x.

title

character string, overall title for the plot.

...

graphical parameters may also be supplied as arguments to the function (see par). For comparison purposes, it is good to set zlim=c(-1,1).

Author(s)

Sandrine Dudoit, sandrine@stat.berkeley.edu

See Also


WGCNA

Weighted Correlation Network Analysis

v1.70-3
GPL (>= 2)
Authors
Peter Langfelder <Peter.Langfelder@gmail.com> and Steve Horvath <SHorvath@mednet.ucla.edu> with contributions by Chaochao Cai, Jun Dong, Jeremy Miller, Lin Song, Andy Yip, and Bin Zhang
Initial release
2021-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.