Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_articulation_points

Get articulation points


Description

Get the nodes in the graph that are identified as articulation points.

Usage

get_articulation_points(graph)

Arguments

graph

A graph object of class dgr_graph.

Value

a vector of node IDs.

Examples

# Create a random graph using the
# `add_gnm_graph()` function
graph <-
  create_graph() %>%
  add_gnm_graph(
    n = 10,
    m = 12,
    set_seed = 23) %>%
  set_node_attrs(
    node_attr = shape,
    values = "square")

# Get the articulation points
# in the graph (i.e., those
# nodes that if any were to be
# removed, the graph would
# become disconnected)
graph %>%
  get_articulation_points()

# For the articulation points,
# change the node shape to
# a `circle`
graph <-
  graph %>%
  select_nodes_by_id(
    nodes = get_articulation_points(.)) %>%
  set_node_attrs_ws(
    node_attr = shape,
    value = "circle")

DiagrammeR

Graph/Network Visualization

v1.0.6.1
MIT + file LICENSE
Authors
Richard Iannone [aut, cre] (<https://orcid.org/0000-0003-3925-190X>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.