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.
den_to_igraph(den, even = FALSE, ...)
A dendrogram object
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
An igraph object.