closeness.vitality {centiserve} | R Documentation |
Closeness vitality of a node is the change in the sum of distances between all node pairs when excluding that node.
closeness.vitality(graph, vids = V(graph), mode = c("all", "out", "in"), weights = NULL)
graph |
The input graph as igraph object |
vids |
Vertex sequence, the vertices for which the centrality values are returned. Default is all vertices. |
mode |
Character string, defined the types of the paths used for measuring the distance in directed graphs. 'in' measures the paths to a vertex, 'out' measures paths from a vertex, all uses undirected paths. This argument is ignored for undirected graphs. |
weights |
Possibly a numeric vector giving edge weights. If this is NULL, the default, and the graph has a weight edge attribute, then the attribute is used. If this is NA then no weights are used (even if the graph has a weight attribute). |
More detail at Closeness Vitality
A numeric vector contaning the centrality scores for the selected vertices.
Mahdi Jalili m_jalili@farabi.tums.ac.ir
Brandes, U. & Erlebach, T. 2005. Network Analysis: Methodological Foundations, U.S. Government Printing Office.
g <- graph(c(1,2,2,3,3,4,4,2,1,4), directed=FALSE) closeness.vitality(g)