Learn R Programming

causact (version 0.5.7)

setDirectedGraphTheme: Set DiagrammeR defaults for graphical models

Description

setDirectedGraph returns a graph with good defaults.

Usage

setDirectedGraphTheme(
  dgrGraph,
  fillColor = "aliceblue",
  fillColorObs = "cadetblue"
)

Value

An updated version of dgrGraph with good defaults for graphical models.

return a dgrGraph object with the color and shape defaults used by the causact package.

Arguments

dgrGraph

A DiagrammeR graph

fillColor

Default R color for filling nodes.

fillColorObs

R color for filling obeserved nodes.

Examples

Run this code
library(DiagrammeR)
create_graph() %>% add_node() %>% render_graph()  # default DiagrammeR aesthetics
create_graph() %>% add_node() %>% setDirectedGraphTheme() %>% render_graph() ## causact aesthetics

Run the code above in your browser using DataLab