qd_swig | R Documentation |
Take a DAG graph object and, in the simplest case, create a single-world intervention template corresponding to a world in which the fixed nodes are set to a given value. Alternatively, tell qd_swig which values fixed nodes will be set to.
qd_swig( graph.obj, fixed.nodes, custom.values = NULL, fixed.sep = "vlin", sep.point.size = 15 )
graph.obj |
A DAG object created by |
fixed.nodes |
A vector containing the nodes to be intervened upon. |
custom.values |
A named vector containing alternative labels identifying explicit values for fixed nodes (e.g., a = 1). |
fixed.sep |
A character string indicating which character to use as a separator in fixed nodes. Defaults to "vlin". Run |
sep.point.size |
A numerical value specifying the point size for fixed node separators. |
# Provide a DAG object and a list of nodes to be fixed edges <- c("A -> Y", "L -> { A Y }") dag <- qd_dag(edges) swig <- dag %>% qd_swig(fixed.nodes = "A", custom.values = c("A" = "1")) swig %>% render_graph()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.