Skip to contents

Converts one connected component and one orientation of a canonical basin merge tree to a crossing-free dendrogram. The conversion preserves the exact branch hierarchy and deterministic leaf order. Its nonnegative hclust heights are display coordinates measured from the most extreme birth level; exact scalar-field merge levels remain attached as attributes. Consequently, the returned dendrogram must not be interpreted as a tree inferred from pairwise distances.

Usage

# S3 method for class 'basin.merge.tree'
as.dendrogram(
  object,
  direction = "max",
  component = NULL,
  label = c("basin.id", "extremum.id", "extremum.vertex"),
  labels = NULL,
  ...
)

Arguments

object

A basin.merge.tree, or a compatible basin_complex.

direction

Tree orientation, "max" or "min".

component

Graph-component number. It may be omitted when the selected direction has exactly one graph component.

label

Canonical basin-table field used for leaf labels.

labels

Optional custom labels. A named vector is matched by basin id; an unnamed vector follows deterministic basin-table order.

...

Reserved for S3 compatibility.

Value

A dendrogram. Exact branch metadata are available in the basin.merge.tree.branches, basin.merge.tree.events, direction, and graph.component attributes.