Skip to contents

ShortestPathLengths: Dijkstra distances. Centralities: degree, strength, closeness, Brandes betweenness, eigenvector (maximum 1), PageRank (damping 0.85, uniform dangling redistribution) and Stephenson-Zelen information centrality. NetworkSummary: density, eccentricity, diameter, radius, transitivity, reciprocity, degree assortativity, global efficiency and degree entropy. ModularityScore: Newman-Girvan modularity. NetworkConnectivity: edge and vertex connectivity. NodeVulnerability: Latora-Marchiori vulnerability and Burt redundancy. Edges are 0-based node pairs (optional third column weight). Identical to the Python arm morie.fn.netstat.

Usage

ShortestPathLengths(n, edges, directed = FALSE, weighted = FALSE)

Centralities(n, edges, directed = FALSE, weighted = FALSE, damping = 0.85)

NetworkSummary(n, edges, directed = FALSE)

ModularityScore(n, edges, membership, resolution = 1)

NetworkConnectivity(n, edges)

NodeVulnerability(n, edges)

Arguments

n

Number of nodes.

edges

Edge matrix with 0-based from and to columns and an optional weight column.

directed

Directed graph.

weighted

Use edge weights as lengths.

damping

PageRank damping.

membership

Community labels.

resolution

Modularity resolution.

Value

Matrix, list or number.

References

Brandes, U. (2001). A faster algorithm for betweenness centrality. Journal of Mathematical Sociology 25, 163-177.

Newman, M. E. J. (2002). Assortative mixing in networks. Physical Review Letters 89, 208701.

Stephenson, K. and Zelen, M. (1989). Rethinking centrality: methods and examples. Social Networks 11, 1-37.

Examples

Centralities(4, rbind(c(0, 1), c(1, 2), c(2, 3)))$betweenness
#> [1] 0 2 2 0
NetworkSummary(4, rbind(c(0, 1), c(1, 2), c(2, 0), c(2, 3)))$transitivity
#> [1] 0.6