Perform hierarchical clustering for heatmap
heat_map_clust(
x,
tree = "row",
dist = "euclidean",
method = "complete",
scale = FALSE,
cut = NULL,
...
)matrix-like object to cluster. The distance matrix will be computed
using dist and passed to hclust for hierarchical clustering.
indicates whether hierarchical clustering should be performed by
"row" or "column". Optionally a custom object of class
"dist" or "hclust" which will be updated with cluster labels
as specified by cut.
method passed to dist to compute distance matrix,
set to "euclidean" by default.
agglomeration method passed to hclust to perform
hierarchical clustering, set to "complete" by default.
logical indicating whether branch heights should be scaled for better visualisation, set to FALSE by default.
value less one specifying the tree cutpoint as a proportion of the tree height or a value greater than 1 indicating the number of desired clusters.
object of class hclust which describes the tree produced by
the clustering process.
# Hierarchical clustering
heat_map_hclust <- heat_map_clust(mtcars, cut = 5)