# Example with 3 layers specified in a list
layers <- list(
c("x1", "x2", "x3"),
c("x4", "x5"),
c("x6", "x7", "x8")
)
dag <- LayeredDAG(layers)
plot(dag)
# Example with 3 layers specified in a vector
dag <- LayeredDAG(layers = c(3, 2, 3))
plot(dag)
Run the code above in your browser using DataLab