Canonicalize DAGs | R Documentation |
Takes an input graph with bidirected edges and replaces every bidirected edge
x <-> y with a substructure x <- L -> y, where L is a latent variable. See
dagitty::canonicalize()
for details. Undirected edges
are not currently supported in ggdag
.
node_canonical(.dag, ...)
ggdag_canonical(
.tdy_dag,
...,
edge_type = "link_arc",
node_size = 16,
text_size = 3.88,
label_size = text_size,
text_col = "white",
label_col = text_col,
use_edges = TRUE,
use_nodes = TRUE,
use_stylized = FALSE,
use_text = TRUE,
use_labels = NULL,
label = NULL,
text = NULL,
node = deprecated(),
stylized = deprecated()
)
.dag, .tdy_dag |
input graph, an object of class |
... |
additional arguments passed to |
edge_type |
The type of edge, one of "link_arc", "link", "arc", "diagonal". |
node_size |
The size of the nodes. |
text_size |
The size of the text. |
label_size |
The size of the labels. |
text_col |
The color of the text. |
label_col |
The color of the labels. |
use_edges |
A logical value. Include a |
use_nodes |
A logical value. Include |
use_stylized |
A logical value. Include |
use_text |
A logical value. Include |
use_labels |
A logical value. Include |
label |
The bare name of a column to use for |
text |
The bare name of a column to use for |
node |
Deprecated. |
stylized |
Deprecated. |
a tidy_dagitty
that includes L or a ggplot
dag <- dagify(y ~ x + z, x ~ ~z)
ggdag(dag)
node_canonical(dag)
ggdag_canonical(dag)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.