spread | R Documentation |
Calculate radiality centrality
spread(graph, mode = c("all", "in", "out"),
weights = E(graph)$weight, f = function(x) 1/x)
graph |
an |
mode |
mode of the centrality |
weights |
If edges in the graph have weight, then by default, the weight is used to calculate the length of the shortest path. Set it to NULL to supress the weight |
f |
function for the weaken rate |
The spread centrality measures how wide the node can send or receive the information in the network. Like the water wave, the effect would be weakened with the increase of the distance to other nodes.
If the weaken function is defined as 1/x
, then the spread centrality is calculated as
sum(1/d(w, v))
where d(w, v)
is the length of the shortest path of node w
and node v
.
Zuguang Gu <z.gu@dkfz.de>
reach
, radiality
require(igraph)
pathway = barabasi.game(200)
spread(pathway)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.