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

Description Usage Arguments Value Examples

View source: R/cluster_matrix.R

Description

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

Usage

1
2
3
4
5
6
7
8
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

1
2
3
4
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 April 30, 2020, 12:14 a.m.