View source: R/cluster_matrix.R
cluster | R Documentation |
cluster
hierarchically clusters the supplied matrix by column and
returns the reordered matrix and optionally the clustering object
cluster(mat, scale = TRUE, dist_method = "pearson", clustering = FALSE, ...)
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 |
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.
set.seed(1452)
cluster( matrix(rnorm(100), ncol = 5) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.