cluster_matrix: hierarchical cluster matrix by rows or columns (or both)

View source: R/cluster_matrix.R

cluster_matrixR Documentation

hierarchical cluster matrix by rows or columns (or both)

Description

cluster_matrix hierarchically clusters the supplied matrix by row or column or both

Usage

cluster_matrix(
  mat,
  by_row = TRUE,
  by_col = FALSE,
  scale = TRUE,
  dist_method = "pearson",
  ...
)

Arguments

mat

Matrix of counts to cluster

by_row

logical - whether to cluster the rows of the matrix

by_col

logical - whether to cluster the columns of the matrix

scale

logical indicating whether to center and scale the data

dist_method

character method for ceating the distance matrix

...

other arguments passed to hclust

Value

reordered matrix based on clustering

Examples

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

cluster_matrix( matrix(rnorm(100), ncol = 5), by_row = FALSE, by_col = TRUE )


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