Convert an igraph object to a dagitty object.
graph2dagitty(graph, graphType = "dag", verbose = FALSE, ...)
A graph as an igraph or as an adjacency matrix.
character, is one of "dag" (default)' or "pdag". DAG can contain the directed (->) and bi-directed (<->) edges, while PDAG can contain the edges: ->, <->, and the undirected edges (--) that represent edges whose direction is not known.
A logical value. If TRUE, the output graph is shown. This argument is FALSE by default.
Currently ignored.
A dagitty object.
# Graph as an igraph object to dagitty object
G <- graph2dagitty(sachs$graph)
plot(dagitty::graphLayout(G))