corPlot {MKmisc} | R Documentation |
Plot of similarity matrix based on correlation
Description
Plot of similarity matrix. This function is a slight modification of function
plot.cor
of the archived package "sma"
.
Usage
corPlot(x, new = FALSE, col, minCor,
labels = FALSE, lab.both.axes = FALSE, labcols = "black",
title = "", cex.title = 1.2,
protocol = FALSE, cex.axis = 0.8,
cex.axis.bar = 1, signifBar = 2, ...)
Arguments
x |
data or correlation matrix, respectively |
new |
If |
col |
colors palette for image. If missing, the |
minCor |
numeric value in [-1,1], used to adjust |
labels |
vector of character strings to be placed at the tickpoints,
labels for the columns of |
lab.both.axes |
logical, display labels on both axes |
labcols |
colors to be used for the labels of the columns of |
title |
character string, overall title for the plot. |
cex.title |
A numerical value giving the amount by which plotting text
and symbols should be magnified relative to the default;
cf. |
protocol |
logical, display color bar without numbers |
cex.axis |
The magnification to be used for axis annotation relative to the
current setting of 'cex'; cf. |
cex.axis.bar |
The magnification to be used for axis annotation of the color
bar relative to the current setting of 'cex'; cf.
|
signifBar |
integer indicating the precision to be used for the bar. |
... |
graphical parameters may also be supplied as arguments to the
function (see |
Details
This functions generates the so called similarity matrix (based on correlation) for a microarray experiment.
If min(x)
, respectively min(cor(x))
is smaller than minCor
,
the colors in col
are adjusted such that the minimum correlation value
which is color coded is equal to minCor
.
Value
invisible()
Note
A first version of this function appeared in package SLmisc.
Author(s)
Matthias Kohl Matthias.Kohl@stamats.de
References
Sandrine Dudoit, Yee Hwa (Jean) Yang, Benjamin Milo Bolstad and with
contributions from Natalie Thorne, Ingrid Loennstedt and Jessica Mar.
sma: Statistical Microarray Analysis.
http://www.stat.berkeley.edu/users/terry/zarray/Software/smacode.html
Examples
## only a dummy example
M <- matrix(rnorm(1000), ncol = 20)
colnames(M) <- paste("Sample", 1:20)
M.cor <- cor(M)
corPlot(M.cor, minCor = min(M.cor))
corPlot(M.cor, minCor = min(M.cor), lab.both.axes = TRUE)
corPlot(M.cor, minCor = min(M.cor), protocol = TRUE)
corPlot(M.cor, minCor = min(M.cor), signifBar = 1)