poset_from_igraph {POSetR} | R Documentation |
Generates a Partially Ordered SET from a Directed Acyclic Graph (DAG)
Description
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.
Usage
poset_from_igraph(g)
Arguments
g |
an |
Details
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.
Value
an environment of class poset
.
References
Davey BA, Priestley HA (2002). Introduction to lattices and order. Cambridge university press.
See Also
Examples
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)
[Package POSetR version 1.1.4 Index]