The ggdag package allows you to create and plot DAGs in R. Here is an example:
R
#Load libraries library(ggdag) library(ggplot2) #Create and prin