cluster: hierarchical clustering

View source: R/cluster_matrix.R

clusterR Documentation

hierarchical clustering

Description

cluster hierarchically clusters the supplied matrix by column and returns the reordered matrix and optionally the clustering object

Usage

cluster(mat, scale = TRUE, dist_method = "pearson", clustering = FALSE, ...)

Arguments

mat

Matrix of counts to cluster

scale

logical indicating whether to center and scale the data

dist_method

character method for ceating the distance matrix

clustering

logical indicating whether to return the hclust

...

Other arguments passed to hclust

Value

If clustering=FALSE, cluster returns the matrix with columns reordered based on clustering. If clustering=TRUE, then a list is returned with names matrix and clustering.

Examples

set.seed(1452)
cluster( matrix(rnorm(100), ncol = 5) )


richysix/miscr documentation built on March 24, 2023, 5:24 a.m.