| 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: dist). |
hclustfun |
function used for hierarchical clustering.
If hclustfun = NULL, no hierarchical clustering in performed and
matrix based seriation is performed to reorder rows and columns
for the heat map. |
method |
a character strings indicating the used seriation algorithm
(see seriate.dist for dendrogram seriation and
for matrix based seriation). |
control |
a list of control options passed on to the seriation algorithm. |
options |
a list with arguments for plotting.
The following arguments are possible:
hclustfun = NULL), the following
additional arguments are possible:
|
... |
further arguments. For dendrogram based heat maps the
arguments are passed on to heatmap in
stats (Note that the following arguments cannot be used:
Rowv, Colv, distfun, hclustfun, reorderfun, scale).
For dendrogram = FALSE further arguments are used as
options (see above). |
For dendrogram = TRUE, seriate.hclust
with the default method "optimal" is used for arranging the
dendrogramms 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"))