getAStats | R Documentation |
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.
getAStats(A, statsType = "interactions", plot.degree = FALSE, collapse.degree = FALSE, verbose = TRUE)
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 |
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)
Coyte et al., Science: "The ecology of the microbiome: Networks, competition, and stability" 350 (6261), 663-666 (2015).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.