heatmap.circular | R Documentation |
A heat map is a false color image (basically
image(t(x))
) with a dendrogram added to the left side
and to the top. Typically, reordering of the rows and columns
according to some set of values (row or column means) within the
restrictions imposed by the dendrogram is carried out. See also heatmap
.
heatmap.circular(x, Rowv = NULL, Colv = if (symm) "Rowv" else NULL,
distfun = dist.circular, hclustfun = hclust,
reorderfun = function(d, w) reorder(d, w), add.expr, symm = FALSE,
revC = identical(Colv, "Rowv"), na.rm = TRUE, margins = c(5, 5),
lwid = c(1, 4), lhei = c(1, 4), ColSideColors, RowSideColors,
NAColors = "black", cexRow = 0.2 + 1/log10(nr), cexCol = 0.2 + 1/log10(nc),
labRow = NULL, labCol = NULL, main = NULL, xlab = NULL, ylab = NULL,
keep.dendro = FALSE, annotate.expr, annotate = rep(NA, 4),
verbose = getOption("verbose"), ...)
x |
numeric matrix of class |
Rowv |
determines if and how the row dendrogram should be
computed and reordered. Either a |
Colv |
determines if and how the column dendrogram should be
reordered. Has the same options as the |
distfun |
function used to compute the distance (dissimilarity)
between both rows and columns. Defaults to |
hclustfun |
function used to compute the hierarchical clustering
when |
reorderfun |
function(d,w) of dendrogram and weights for
reordering the row and column dendrograms. The default uses
|
add.expr |
expression that will be evaluated after the call to
|
symm |
logical indicating if |
revC |
logical indicating if the column order should be
|
na.rm |
logical indicating whether |
margins |
numeric vector of length 2 containing the margins
(see |
lwid |
a vector of values for the widths of columns on the device.
Relative widths are specified with numeric values. Absolute
widths (in centimetres) are specified with the |
lhei |
a vector of values for the heights of rows on the device.
Relative and absolute heights can be specified, see |
ColSideColors |
(optional) character vector of length |
RowSideColors |
(optional) character vector of length |
NAColors |
the color used to plot missing values. |
cexRow , cexCol |
positive numbers, used as |
labRow , labCol |
character vectors with row and column labels to
use; these default to |
main , xlab , ylab |
main, x- and y-axis titles; defaults to none. |
keep.dendro |
logical indicating if the dendrogram(s) should be
kept as part of the result (when |
annotate |
annotation in the four external side of the figure. A positive value in a position means you want annotate something in that position (1=bottom, 2=left, 3=top, 4=right). For instance, |
annotate.expr |
must be a list of expressions with the same length as |
verbose |
logical indicating if information should be printed. |
... |
additional arguments passed on to |
If either Rowv
or Colv
are dendrograms they are honored
(and not reordered). Otherwise, dendrograms are computed as
dd <- as.dendrogram(hclustfun(distfun(X)))
where X
is
either x
or t(x)
.
If either is a vector (of ‘weights’) then the appropriate
dendrogram is reordered according to the supplied values subject to
the constraints imposed by the dendrogram, by reorder(dd,
Rowv)
, in the row case.
If either is missing, as by default, then the ordering of the
corresponding dendrogram is by the mean direction value of the rows/columns,
i.e., in the case of rows, Rowv <- rowMeans(x, na.rm=na.rm)
.
If either is NULL
, no reordering will be done for
the corresponding side.
Unless Rowv = NA
(or Colw = NA
), the original rows and
columns are reordered in any case to match the dendrogram,
e.g., the rows by order.dendrogram(Rowv)
where
Rowv
is the (possibly reorder()
ed) row
dendrogram.
heatmap()
uses layout
and draws the
image
in the lower right corner of a 2x2 layout.
Consequentially, it can not be used in a multi column/row
layout, i.e., when par(mfrow= *)
or (mfcol= *)
has been called.
par(mfrow= *)
or (mfcol= *)
has been called.
Claudio Agostinelli using the code from heatmap
.
dist.circular
, heatmap
, image
, hclust
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.