orderArray: Order each dimension of array by hierarchical clustering.

Description Usage Arguments Value See Also Examples

View source: R/utils.R

Description

Order each dimension of array by hierarchical clustering.

Usage

1
2
3
4
5
6
7
8
9
orderArray(
  ar,
  dims = NULL,
  metric = "cor",
  method = "complete",
  cor_use = "pairwise.complete.obs",
  cor_method = "pearson",
  return_hclust = FALSE
)

Arguments

ar

array.

dims

vector, integer. Dimensions to order. If NULL, all dims are ordered.

metric

character. Distance metric by which to compare hyperplanes along dimension. Hyperplanes are flattened into vectors for comparison. Support "cor" ((1 - r) / 2) or any dist method.

method

character. Any hclust agglomeration method.

cor_use

character. Only applicable if metric = "cor". use argument of cor.

cor_method

character. Only applicable if metric = "cor". method argument of cor.

return_hclust

logical. Return list of hclust objects for ordered dimensions.

Value

list. length = length(dim(ar)).

See Also

cor, dist, hclust.

Examples

1
2
ar <- matrix(c(1, 1, 1, 2, 2, 2, 3, 4, 5), nrow = 3)
orderArray(ar)

bentyeh/r_bentyeh documentation built on Jan. 1, 2021, 4:59 p.m.