Skip to contents

Return the hierarchical clustering order of a matrix

Usage

get_matrix_order(matrix, dist_method = "euclidean", hclust_method = "complete")

Arguments

matrix

Matrix to cluster.

dist_method

Distance method to apply to the matrix. Argument is directly passed into stats::dist. Options include "euclidean", "maximum", "manhattan", "canberra", "binary", or "minkowski".

hclust_method

Which agglomerative method to be passed into stats::hclust. Options include "ward.D", "ward.D2", "single", "complete", "average", "mcquitty", "median", or "centroid".

Value

A numeric vector of the ordering derivied by the specified hierarchical clustering method applied to the provided matrix.