Learn R Programming

ggraph (version 1.0.2)

den_to_igraph: Convert a dendrogram into an igraph object

Description

This small helper function converts a dendrogram into an igraph object with the same node indexes as would be had were the dendrogram used directly in a ggraph plot. The nodes would have the same attributes as would have been calculated had the dendrogram been used in layout creation, meaning that e.g. it contains a leaf attribute which is TRUE for leaf nodes and FALSE for the rest.

Usage

den_to_igraph(den, even = FALSE, ...)

Arguments

den

A dendrogram object

even

Logical should the position information be calculated based on an even layout (see layout_dendrogram_even).

...

Additional parameters to pass off to layout_dendrogram_dendrogram

Value

An igraph object.