getAStats: Analyse an interaction matrix

View source: R/getAStats.R

getAStatsR Documentation

Analyse an interaction matrix

Description

Count interaction types or compute network properties of interaction matrix. The mean interaction strength is computed according to Coyte and colleagues by fitting a half-normal distribution to the realized interaction strengths. Graph properties (modularity, average clustering coefficient, average path length) are computed using igraph functions.

Usage

getAStats(A, statsType = "interactions", plot.degree = FALSE,
  collapse.degree = FALSE, verbose = TRUE)

Arguments

A

the interaction matrix

statsType

interactions, degree or network

plot.degree

plot the degree distribution (for statsType network)

collapse.degree

sum degrees for taxa with the same name (for statsType degree)

verbose

print results

Value

for degree a matrix with positive, negative and total degree (including self-loops, excluding missing values), else a list; for statsType interactions: meanstrength = average interaction strength, varstrength = variance of interaction strength, nbinteractions = total interaction number (excluding diagonal), nbmut = number of mutualisms, nbcomp = number of competitions, nbcom = number of commensalisms, nbam = number of amensalisms, nbexp = number of exploitations, for statsType network: nodenum (node number), arcnum (arc number, including diagonal), mod (fast greedy modularity), cc (average clustering coefficient), avgpathlength (average shortest path length)

References

Coyte et al., Science: "The ecology of the microbiome: Networks, competition, and stability" 350 (6261), 663-666 (2015).


hallucigenia-sparsa/seqtime documentation built on Jan. 9, 2023, 11:53 p.m.