Skip to contents

Create an network object from an adjacencylist

Usage

adjacencylist_network(
  adjacencylist,
  is_undirected = TRUE,
  above_diagonal = is_undirected
)

Arguments

adjacencylist

a list of vectors containing the neighbours of each node. Same format as return value of network_adjacencylist.

is_undirected

TRUE if the network is supposed to be undirected, i.e. contains a link from \(i\) to \(j\) exactly if it contains a link from \(j\) to \(i\).

above_diagonal

set to TRUE if the network is undirected and the adjacencylist only contains edges \(i,j\) with \(i \leq j\), i.e. represent the upper triangular submatrix of the adjacency matrix. Defaults to TRUE for undirected networks.

Value

a network object