betweenness_w: Betweenness centrality in a weighted network
Description
This function calculates betweenness scores for nodes in a weighted network based on the distance_w.
Note: This algorithm relies on the igraphs package's implementation of Dijkstra's algorithm. Currently, it does not find multiple shortest paths if two exist.
Usage
betweenness_w(net, directed=NULL, alpha=1)
Arguments
net
A weighted edgelist
directed
logical, whether the network is directed or undirected. Default is NULL, this means that the function checks whether the edgelist is directed or not.
alpha
sets the alpha parameter in the generalised measures from Opsahl, T., Agneessens, F., Skvoretz, J., 2010. Node Centrality in Weighted Networks: Generalizing Degree and Shortest Paths. Social Networks.
Value
Returns a data.frame with two columns: the first containts the node ids of all the nodes in the edgelist, and the second containts the corresponding betweenness scores.