This function and all of its descriptions have been obtained from the igraph package.

betweenness(
  graph,
  v = V(graph),
  directed = TRUE,
  weights = NULL,
  nobigint = TRUE,
  normalized = FALSE,
  ...
)

Arguments

graph

The graph to analyze (an igraph graph).

v

The vertices for which the vertex betweenness will be calculated.

directed

Logical, whether directed paths should be considered while determining the shortest paths.

weights

Optional positive weight vector for calculating weighted betweenness. If the graph has a weight edge attribute, then this is used by default. Weights are used to calculate weighted shortest paths, so they are interpreted as distances.

nobigint

Logical scalar, whether to use big integers during the calculation. This is only required for lattice-like graphs that have very many shortest paths between a pair of vertices. If TRUE (the default), then big integers are not used.

normalized

Logical scalar, whether to normalize the betweenness scores. If TRUE, then the results are normalized.

...

Additional arguments according to the original betweenness function in the package igraph.

Value

A numeric vector with the betweenness score for each vertex in v.

See also

ivi, cent_network.vis, and betweenness for a complete description on this function

Other centrality functions: clusterRank(), collective.influence(), degree(), h_index(), lh_index(), neighborhood.connectivity(), sirir()

Examples

MyData <- coexpression.data
My_graph <- graph_from_data_frame(MyData)
GraphVertices <- V(My_graph)
My_graph_betweenness <- betweenness(My_graph, v = GraphVertices,
                        directed = FALSE, normalized = FALSE)
#> Warning: 'nobigint' is deprecated since igraph 1.3 and will be removed in igraph 1.4