DiagrammeR (version 0.9.0)

get_graph_diameter: Get the graph diameter

Description

Get the graph diameter, which is the maximum eccentricity.

Usage

get_graph_diameter(graph)

Arguments

graph

a graph object of class dgr_graph.

Value

the graph diameter as a single-length vector.

Examples

Run this code
# NOT RUN {
# Get the graph diameter for a
# randomly-created graph
get_graph_diameter(
  create_random_graph(
    n = 5, m = 7,
    set_seed = 23))
#> [1] 3
# }

Run the code above in your browser using DataLab