reach: Reach centrality

View source: R/centrality.R

reachR Documentation

Reach centrality

Description

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.

Usage

reach(
  graph,
  order = 2,
  mode = "all",
  weight = E(graph)$weight,
  max.path = NULL
)

Arguments

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

Details

Reach can be calculated for both directed and undirected graphs. For unweighted graphs see neighborhood.size or ego.size from igraph.

Value

a numeric vector with reach scores

See Also

ego, ego_size, degree, vertex.measures

Examples

data(pe13)
r <- reach(net.elite, order = 2)
tail(sort(r))
r <- reach(net.elite, order = 3, max.path = 2)
tail(sort(r))

antongrau/eliter documentation built on March 2, 2024, 8:05 p.m.