get_subtrees: Get subtree

View source: R/fct_getSubTrees.R

get_subtreesR Documentation

Get subtree

Description

Get subtree

Usage

get_subtrees(
  dend,
  k = NULL,
  h = NULL,
  use_labels_not_values = FALSE,
  order_clusters_as_data = FALSE
)

Arguments

dend

dendrogram

k

numeric scalar (OR a vector) with the number of clusters the tree should be cut into.

h

numeric scalar (OR a vector) with a height where the tree should be cut.

use_labels_not_values

logical, defaults to TRUE. If the actual labels of the clusters do not matter - and we want to gain speed (say, 10 times faster) - then use FALSE (gives the "leaves order" instead of their labels.). This is passed to cutree_1h.dendrogram.

order_clusters_as_data

logical, defaults to TRUE. There are two ways by which to order the clusters: 1) By the order of the original data. 2) by the order of the labels in the dendrogram. In order to be consistent with cutree, this is set to TRUE. This is passed to cutree_1h.dendrogram.

Value

dendrogram


chasemc/IDBacApp documentation built on Oct. 22, 2022, 2:52 a.m.