get_graph_diameter {DiagrammeR} | R Documentation |
Get the graph diameter, which is the maximum eccentricity.
get_graph_diameter(graph)
graph |
a graph object of class
|
the graph diameter as a single-length vector.
# Get the graph diameter for a # randomly-created graph get_graph_diameter( create_random_graph( n = 5, m = 7, set_seed = 23)) #> [1] 3