as_tbl_graph | R Documentation |
A thin wrapper to convert tidy_dagitty
and dagitty
objects to
tbl_graph
, which can then be used to work in tidygraph
and
ggraph
directly. See tidygraph::as_tbl_graph()
.
## S3 method for class 'tidy_dagitty'
as_tbl_graph(x, directed = TRUE, ...)
## S3 method for class 'dagitty'
as_tbl_graph(x, directed = TRUE, ...)
x |
an object of class |
directed |
logical. Should the constructed graph be directed? Default
is |
... |
other arguments passed to |
a tbl_graph
library(ggraph)
library(tidygraph)
butterfly_bias() %>%
as_tbl_graph() %>%
ggraph() +
geom_edge_diagonal() +
geom_node_point()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.