draw_dag: Draw causal graph (DAG)

View source: R/draw_dag.R

draw_dagR Documentation

Draw causal graph (DAG)

Description

Draw causal graph (DAG)

Usage

draw_dag(d)

Arguments

d

data.frame, with columns 'from' and 'to'.

Details

An arrow is drawn between column 'from' and 'to', indicating the potential causal relationship among variables.

Value

nothing.

Examples


d <- data.frame(
 from = c("Rain", "Sun", "Latitude", "Latitude"),
 to = c("Mental health", "Mental health", "Rain", "Sun")
)
draw_dag(d)


emilio-berti/monkeytools documentation built on April 15, 2022, 8:14 a.m.