reorder_hclust: Given a clustering of some data, and some ideal order we'd...

Description Usage Arguments Value Examples

View source: R/slanter.R

Description

Given a clustering of some data, and some ideal order we'd like to use to visualize it, reorder (but do not modify) the clustering to be as consistent as possible with this ideal order.

Usage

1
reorder_hclust(clusters, order)

Arguments

clusters

The existing clustering of the data.

order

The ideal order we'd like to see the data in.

Value

A reordered clustering which is consistent, wherever possible, the ideal order.

Examples

1
2
3
4
clusters <- hclust(dist(mtcars))
clusters$order
clusters <- slanter::reorder_hclust(clusters, 1:length(clusters$order))
clusters$order

tanaylab/slanter documentation built on May 12, 2021, 11:21 a.m.