Compute connectance of an interaction matrix.

getConnectance(A)

Arguments

A

an interaction matrix

Value

the connectance

Details

The connectance is defined as \(c=E/(N*(N-1))\), where \(E\) is the number of realized arcs (the number of non-zero entries in the interaction matrix) and \(N*(N-1)\) the number of possible arcs. The diagonal (self-arcs) is excluded.

Examples

A <- cbind(c(-1,0,1),c(0,-1,0),c(-1,0,-1)) x <- getConnectance(A)