corPlot {MKmisc} | R Documentation |
Plot of similarity matrix. This function is a slight modification of function
plot.cor
of package "sma"
.
corPlot(x, new = FALSE, col, minCor, labels = FALSE, labcols = "black", title = "", protocol = FALSE, cex.axis = 0.8, cex.axis.bar = 1, ...)
x |
data or correlation matrix, respectively |
new |
If new=FALSE , x must already be a correlation matrix.
If new=TRUE , the correlation matrix for the columns of
x is computed and displayed in the image. |
col |
colors palette for image. If missing, the RdYlGn palette
of RColorBrewer is used. |
minCor |
numeric value in [-1,1], used to adjust col |
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. |
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. par . |
cex.axis.bar |
The magnification to be used for axis annotation of the color
bar relative to the current setting of 'cex'; cf.
par . |
... |
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) . |
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
.
invisible()
A first version of this function appeared in package SLmisc.
Matthias Kohl Matthias.Kohl@stamats.de
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/Html/smacode.html
## only a dummy example M <- cor(matrix(rnorm(1000), ncol = 20)) corPlot(M, minCor = min(M))