aspl {memnet} | R Documentation

## Average shortest path length (aspl)

### Description

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

### Usage

    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

    # 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')

[Package memnet version 0.1.0 Index]