cluster: hierarchical clustering

Description Usage Arguments Value Examples

View source: R/cluster_matrix.R

Description

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

Usage

1
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

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

richysix/miscr documentation built on April 30, 2020, 12:14 a.m.