ggp_dag: Plot a DAG with ggplot and node names with subscripts

View source: R/ggp_dag.R

ggp_dagR Documentation

Plot a DAG with ggplot and node names with subscripts

Description

Plot a DAG with ggplot and node names with subscripts.

Usage

ggp_dag(
  dag,
  layout = "sugiyama",
  text_labels = NULL,
  text_size = 7,
  box_padding = 1,
  legend_pos = "bottom"
)

Arguments

dag

dag object

layout

Name of layout, default is "sugiyama".

text_labels

If NULL (default) the nodes' names are used as is. If a vector of text labels is given they MUST BE IN ALPHABETICAL ORDER.

text_size

Integer. Size of the nodes' name.

box_padding

Box padding for geom_dag_label_repel

legend_pos

Legend position of ggplot.

Details

The DAG will be plotted using ggplot2 and the nodes' names can have subscript as in mathematical notations. See the source below for more details.

Value

ggplot object

Source

https://www.r-bloggers.com/2019/10/how-to-use-math-symbols-with-ggdag-2/


FrankLef/fciR documentation built on Nov. 12, 2023, 6:09 a.m.