Learn R Programming

DiagrammeR (version 0.8.4)

get_bridging: Get bridging scores

Description

Get the bridging scores (based on Valente's Bridging vertex measure) for all nodes in a graph.

Usage

get_bridging(graph)

Arguments

graph
a graph object of class dgr_graph.

Value

a data frame with bridging scores for each of the nodes.

Examples

Run this code
# Create a random graph
graph <-
  create_random_graph(
    10, 22, set_seed = 1)

# Get the bridging scores for nodes in the graph
get_bridging(graph)
#>    node    bridging
#> 1     1 0.006944444
#> 2     2 0.006296296
#> 3     3 0.006018519
#> 4     4 0.006944444
#> 5     5 0.005555556
#> 6     6 0.006790123
#> 7     7 0.006790123
#> 8     8 0.006666667
#> 9     9 0.005555556
#> 10   10 0.006790123

Run the code above in your browser using DataLab