View source: R/dag_diagrammer.R
dag_diagrammer | R Documentation |
Convert a causact_graph
to a DiagrammeR
object for visualization.
dag_diagrammer(
graph,
wrapWidth = 24,
shortLabel = FALSE,
fillColor = "aliceblue",
fillColorObs = "cadetblue"
)
graph |
a graph object of class |
wrapWidth |
a required character label that describes the node. |
shortLabel |
a longer more descriptive character label for the node. |
fillColor |
a valid R color to be used as the default node fill color. |
fillColorObs |
a valid R color to be used as the fill color for observed nodes. |
a graph object of class dgr_graph
. Useful for further customizing graph displays using the DiagrammeR
package.
library("DiagrammeR")
dag_create() %>%
dag_node("Get Card","y",
rhs = bernoulli(theta),
data = carModelDF$getCard) %>%
dag_diagrammer() %>%
render_graph(title = "DiagrammeR Version of causact_graph")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.