geokpath: Find the geodesic k-path centrality

Description Usage Arguments Details Value Author(s) References Examples

Description

Geodesic K-path centrality counts neighbours as those that are on a geodesic path less than "k" away.

Usage

1
2
geokpath(graph, vids = V(graph), mode = c("all", "out", "in"),
  weights = NULL, k = 3)

Arguments

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 constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. If out then the shortest paths from the vertex, if in then to it will be considered. If all, the default, then the corresponding undirected graph will be used, ie. not directed paths are searched. 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).

k

The k parameter. The default is 3.

Details

More detail at Geodesic K-Path Centrality

Value

A numeric vector contaning the centrality scores for the selected vertices.

Author(s)

Mahdi Jalili m_jalili@farabi.tums.ac.ir

References

Borgatti, Stephen P., and Martin G. Everett. "A graph-theoretic perspective on centrality." Social networks 28.4 (2006): 466-484.

Examples

1
2
g <- barabasi.game(100)
geokpath(g)

Example output

Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Loading required package: Matrix
  [1] 63 32 65 51 42 29 31 32 36 42 36 31 34 32 35 32 31 26  8 22 16 22 18 22 22
 [26]  5 20 12 31 32 28 22 31 22 33 22  4 22 22 12  5 22 26 16  7 32  6  6 10 18
 [51] 18 10  7 13  5 32 31  3  6 31 18 17  6  7 32 26  7  6  5  4 26 27 10 10  4
 [76]  9  4  5  3  5 31  8  7  6 26  7  3 31 31 18 12 16 32 15  4 31  3  4 15 31

centiserve documentation built on May 2, 2019, 6:01 a.m.