# initialize empty graph and build slowly
cg <- caugi(class = "PDAG")
cg <- cg |>
add_nodes(c("A", "B", "C", "D", "E")) |> # A, B, C, D, E
add_edges(A %-->% B %-->% C) |> # A --> B --> C, D, E
set_edges(B %---% C) # A --> B --- C, D, E
cg <- remove_edges(cg, B %---% C) |> # A --> B, C, D, E
remove_nodes(c("C", "D", "E")) # A --> B
# verbs do not build the Rust backend
cg@built # FALSE
build(cg)
cg@built # TRUE
Run the code above in your browser using DataLab