is_graph_connected: Is the graph a connected graph?

Description Usage Arguments Value Examples

View source: R/is_graph_connected.R

Description

Determines whether a graph is a connected graph.

Usage

1

Arguments

graph

a graph object of class dgr_graph.

Value

a logical value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# 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 documentation built on March 18, 2018, 1:25 p.m.