graph2dagitty | R Documentation |
Convert an igraph object to a dagitty object.
graph2dagitty(graph, graphType = "dag", verbose = FALSE, ...)
graph |
A graph as an igraph or as an adjacency matrix. |
graphType |
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. |
verbose |
A logical value. If TRUE, the output graph is shown. This argument is FALSE by default. |
... |
Currently ignored. |
A dagitty object.
Mario Grassi mario.grassi@unipv.it
# Graph as an igraph object to dagitty object
G <- graph2dagitty(sachs$graph)
plot(dagitty::graphLayout(G))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.