# Create an empty graph and
# add a path of 6 nodes
graph <-
create_graph() %>%
add_path(n = 6)
# Select nodes `3` and `4`
# and fully disconnect them
# from the graph
graph <-
graph %>%
select_nodes_by_id(
nodes = 3:4) %>%
fully_disconnect_nodes_ws()
# Get the graph's edge data frame
graph %>% get_edge_df()
Run the code above in your browser using DataLab