Use closeness()
with the cutoff
argument instead.
The graph to analyze.
The vertices for which closeness will be calculated.
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.
The maximum path length to consider when calculating the closeness. If zero or negative then there is no such limit.
Optional positive weight vector for calculating weighted
closeness. If the graph has a weight
edge attribute, then this is
used by default. Weights are used for calculating weighted shortest
paths, so they are interpreted as distances.
Logical scalar, whether to calculate the normalized closeness, i.e. the inverse average distance to all reachable vertices. The non-normalized closeness is the inverse of the sum of distances to all reachable vertices.