# Create and export a graph
cg <- caugi(
A %-->% B,
B %-->% C,
class = "DAG"
)
tmp <- tempfile(fileext = ".graphml")
write_graphml(cg, tmp)
# Read it back
cg2 <- read_graphml(tmp)
# Clean up
unlink(tmp)
Run the code above in your browser using DataLab