View source: R/poset_from_igraph.R
poset_from_igraph | R Documentation |
This function generates a poset from an objectg
. The function checks if the graph is directed and cyclic in oreder it represent the cover-relation.
poset_from_igraph(g)
g |
an |
Note that the Hasse diagram represents the cover relation from the top to the bottom, therefore its representation is the opposite of the plot of the graph with Sugiyama layout.
an environment of class poset
.
davey2002introductionPOSetR
poset
.
library(igraph)
g <- make_tree(10)
ly <- igraph::layout_with_sugiyama(g)$layout
g$layout <- ly
plot(g)
p <- poset_from_igraph(g)
plot(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.