Learn R Programming

SemNeT (version 2.0.0)

aspl: Average Shortest Path Length

Description

Computes the global average shortest path length of a network

Usage

aspl(A, weighted = FALSE)

ASPL(A, weighted = FALSE)

Value

Returns the network's ASPL. The per-node average shortest path length and eccentricity are attached as the "node" and "eccentricity" attributes, rather than being computed and discarded

Arguments

A

Matrix or data frame. An adjacency matrix of network data

weighted

Boolean. Is the network weighted? Defaults to FALSE. Set to TRUE for weighted measures

Author

Alexander Christensen <[email protected]>

References

Rubinov, M., & Sporns, O. (2010). Complex network measures of brain connectivity: Uses and interpretations. NeuroImage, 52, 1059-1069.

Examples

Run this code
# Pearson's correlation only for CRAN checks
fluency_data <- matrix(sample(0:1, 1000, replace = TRUE), nrow = 100, ncol = 10)
A <- suppressWarnings(tmfg(similarity(fluency_data, method = "cor")))

# Unweighted
network_aspl <- aspl(A)

Run the code above in your browser using DataLab