Perform hierarchical clustering for heatmap

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 dist and passed to hclust for 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 by cut.

dist

method passed to dist to compute distance matrix, set to "euclidean" by default.

method

agglomeration method passed to hclust to 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 one specifying the tree cutpoint as a proportion of the tree height or a value greater than 1 indicating the number of desired clusters.

...

additional arguments passed to dist or hclust.

Value

object of class hclust which describes the tree produced by the clustering process.

Author

Dillon Hammill (Dillon.Hammill@anu.edu.au)

Examples

# Hierarchical clustering
heat_map_hclust <- heat_map_clust(mtcars, cut = 5)