Skip to content

can't convert dendrogram object to igraph object then plot as dendrogram with geom_edge_elbow #72

@wkc1986

Description

@wkc1986

Trying to plot an igraph object that was converted from a dendrogram object with den_to_igraph, with dendrogram layout and geom_edge_elbow gives an error. MWE:

library(ggraph)
library(igraph)

dendro <- as.dendrogram(hclust(dist(iris[-5])))
igraf <- den_to_igraph(dendro)
ggraph(igraf, "dendrogram") + geom_edge_elbow()

gets

Error in eval(expr, envir, enclos) : object 'direction' not found

I would plot the dendrogram object directly, but I want to use tree_apply, which, as I understand, currently only works on igraph objects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions