getAdjacencyMatrix: Compute the adjacency matrix for a given alienData object

Description Usage Arguments Details Value Author(s)

View source: R/getAdjacencyMatrix.R

Description

Computes the adjacency matrix based on the edge par of an alienData object.

Usage

1
getAdjacencyMatrix(object, bipartite = FALSE, binary = FALSE, threshold = 0)

Arguments

object

An object of class alienData.

bipartite

Logical. Whether the adjacency matrix should be constructed for a associated with a bipartite network? Default is FALSE.

binary

Logical. Should the interactions be binary (see details)? Otherwise the value column of edge is used. Default is FALSE.

threshold

A positive-real number used to determine binary interactions (ignored if binary is FALSE).

Details

By default getAdjacencyMatrix creates a square matrix including all nodes found in the node data frame of object. Then, it reads edge to fill the matrix out. If bipartite is TRUE then only the nodes found in the from column of edge are used to name the rows of the adjacency matrix. Similarly, the to nodes become the columns names.

Currently if there are several values for the same interaction getAdjacencyMatrix sums them unless binary is TRUE.

Value

An adjacency matrix of class matrix.

Author(s)

Kevin Cazelles, F. Guillaume Blanchet


TheoreticalEcosystemEcology/alien documentation built on Feb. 21, 2020, 7:12 p.m.