aspl: Average shortest path length (aspl)

Description Usage Arguments Details Value Examples

Description

Computes the average shortest path length (aspl) using igraph's automatic method.

Usage

1
aspl(adj, types = "uncorrected", weights = NULL, mode = "undirected")

Arguments

adj

numeric matrix representing the adjacency matrix.

types

character. Either "uncorrected" or "corrected", or a vector containing both.

weights

numeric vector of edge weights. Optional.

mode

character, either "directed" or "undirected", specifying whether the network should be interepeted as directed or undirected. Defaults to "undirected".

Details

Per default the uncorrected apsl is computed. Otherwise, the uncorrected aspl is normalized by log(n nodes)/log(average degree), i.e., the expected average shortest path length for an Erdös-Renyi random graph.

Value

Local clustering coefficient.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# get fluency data
data(animal_fluency)

# edge lists of fluency graphs
edge_list = threshold_graph(animal_fluency)

# get adjacency matrices
adj = edg_to_adj(edge_list)

# get average shortest path length
aspl(adj)

# get corrected average shortest path length
aspl(adj, types = 'corrected')

memnet documentation built on May 2, 2019, 9:35 a.m.