clustree: Parse a hclust structure for plotting

Description Usage Arguments Details Value See Also

View source: R/plotDendrogram.r

Description

Parse a hclust structure for plotting

Usage

1
2
clustree(atree, orientation = c(1:4), type = c(1, 2), positions = NULL,
  classes = 1)

Arguments

atree

An object of class hclust.

orientation

Branching direction: 1 top-down, 2 right-to-left, 3 bottom-up, 4 left-to-right.

type

1 uniform height steps, 2 calculated by hclust with base = 0, 3 same as 2, with base = height from hclust.

positions

Takes 'y'-positions in the order of drawing layout (atree$order), i.e. ascending values.

classes

Cut tree into sub-branches, return as column in $segments and $leaves.

Details

Takes a hclust structure and returns rendered coordinates to draw the tree, according to orientation and type parameters. Also returns leaf labels. Generates segments of tree based on pre-calculated coordinates for leaves and in any orientation, unlike plot.hclust or package ggdendro.

Value

List of geometric elements for plotting the tree structure and labels.

See Also

hclust


thegeologician/ggprovenance documentation built on Sept. 26, 2021, 8:59 a.m.