Perform hierarchical clustering for heatmap
Usage
heat_map_clust(
x,
tree = "row",
dist = "euclidean",
method = "complete",
scale = FALSE,
cut = NULL,
...
)Arguments
- x
matrix-like object to cluster. The distance matrix will be computed using
distand passed tohclustfor hierarchical clustering.- tree
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 bycut.- dist
method passed to
distto compute distance matrix, set to"euclidean"by default. Also supports"cosine"for cosine distance (1 - cosine similarity).- method
agglomeration method passed to
hclustto perform hierarchical clustering, set to"complete"by default.- scale
logical indicating whether branch heights should be scaled for better visualisation, set to FALSE by default.
- cut
value less than 1 specifying the tree cutpoint as a proportion of the tree height (for non-cosine distances) or as an absolute cosine distance threshold (when
dist = "cosine"), or a value greater than or equal to 1 indicating the number of desired clusters.- ...
