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

is_graph_connected

Is the graph a connected graph?


Description

Determines whether a graph is a connected graph.

Usage

is_graph_connected(graph)

Arguments

graph

A graph object of class dgr_graph.

Value

A logical value.

Examples

# Create a random graph using the
# `add_gnm_graph()` function; this
# graph is not connected
create_graph() %>%
  add_gnm_graph(
    n = 15,
    m = 10,
    set_seed = 23) %>%
  is_graph_connected()

# Create another random graph;
# this graph is connected
create_graph() %>%
  add_gnm_graph(
    n = 10,
    m = 15,
    set_seed = 23) %>%
  is_graph_connected()

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.