graph_info: Get metrics for a graph

Description Usage Arguments Value Examples

View source: R/graph_info.R

Description

Get a data frame with metrics for a graph.

Usage

1
graph_info(graph)

Arguments

graph

a graph object of class dgr_graph.

Value

a data frame containing metrics pertaining to the graph

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
# Import a GML graph file available
# in the DiagrammeR package
karate_club <-
  system.file(
    "extdata", "karate.gml",
    package = "DiagrammeR") %>%
  import_graph() %>%
  set_graph_name("karate")

# Display a data frame with graph information
graph_info(karate_club)
#>     name  n  e  dens mn_deg mx_deg avg_deg time   tz
#> 1 karate 34 78 0.139      1     17       5 <NA> <NA>

## End(Not run)

DiagrammeR documentation built on Sept. 7, 2017, 1:06 a.m.