hmap {seriation} | R Documentation |
Provides several reordered versions of heat map including dendrogram based reordering with optimal leaf order and matrix seriation based heat maps.
hmap(x, distfun = dist, hclustfun = hclust, method = NULL, control = NULL, options = NULL, ...)
x |
a matrix. |
distfun |
function used to compute the distance (dissimilarity) between
both rows and columns (default: |
hclustfun |
function used for hierarchical clustering.
If |
method |
a character strings indicating the used seriation algorithm
(see |
control |
a list of control options passed on to the seriation algorithm. |
options |
a list with arguments for plotting. The following arguments are possible:
For matrix based seriation (
|
... |
further arguments. For dendrogram based heat maps the
arguments are passed on to For |
For dendrogram = TRUE
, seriate.hclust
with the default method "optimal"
is used for arranging the
dendrograms and x
. heatmap
is used for plotting.
For dendrogram = FALSE
, seriate.dist
with the default method "tsp"
(a traveling salesperson solver) for arranging x
is used.
grid code implemented in this package
is used to produce the plot.
Note that unlike the default behavior of heatmap
,
scaling is not automatically applied. The data
have to be scaled before using hmap
.
An invisible list with elements:
rowInd, colInd |
index permutation vectors. |
reorder_method |
name of the method used to reorder the matrix. |
For dendrogram = TRUE
the list can contain additional elements
(see heatmap
for details).
seriate.dist
and
heatmap
in stats.
data("Zoo") x <- as.matrix(Zoo[, -17]) x <- scale(x, center = FALSE) ## optimally reordered heatmap hmap(x) ## heatmap with seriated distance matrices hmap(x, hclustfun = NULL) ## with proportional display hmap(x, hclustfun = NULL, options = list(prop = TRUE, main = "Zoo Data"))