reach | R Documentation |
The number of people you can reach within a few steps (usually 2). This is similar to the size of your neighborhood except that reach takes the strength of the edges into account. The distance between two people is the sum of the edge weights of the edges in the path between the two people. If you use the max.path argument you can restrict the maximum number of people a "reach path" can go through. This is relevant for networks with very strong connections aka. short distances between agents.
reach(
graph,
order = 2,
mode = "all",
weight = E(graph)$weight,
max.path = NULL
)
graph |
a weighted graph |
order |
the maximum distance between two vertices |
mode |
the direction of the edges; either, "in", "out" or "all" |
weight |
the edge weight as distance |
max.path |
the maximum unweighted path length |
Reach can be calculated for both directed and undirected graphs. For unweighted graphs see neighborhood.size or ego.size from igraph.
a numeric vector with reach scores
ego, ego_size, degree, vertex.measures
data(pe13)
r <- reach(net.elite, order = 2)
tail(sort(r))
r <- reach(net.elite, order = 3, max.path = 2)
tail(sort(r))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.