library(cna) # required for randomCsf() and allCombs()
# Manual crisp-set example.
x <- "(X+Y<->S)*(D+s*B<->E)*(A+S*B<->C)*(C+E<->F)"
gr1 <- causalHyperGraph(x)
export_as_svg(gr1, file.path(tempdir(), "csGraph"))
# Random multi-value example.
y <- randomCsf(allCombs(c(3,4,3,5,3,4)))
gr2 <- chg(y)
export_as_svg(gr2, file.path(tempdir(), "mvGraph"))
file.remove(file.path(tempdir(), c("csGraph.svg", "mvGraph.svg")))
Run the code above in your browser using DataLab