DiagrammeR (version 1.0.0)

fully_disconnect_nodes_ws: Fully disconnect all nodes in a selection of nodes

Description

With a selection of nodes in a graph, remove any edges to or from those nodes.

Usage

fully_disconnect_nodes_ws(graph)

Arguments

graph

a graph object of class dgr_graph.

Value

a graph object of class dgr_graph.

Examples

Run this code
# NOT RUN {
# 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