Last chance! 50% off unlimited learning
Sale ends in
Calculates network nestedness, also within and between modules, i.e. separate nestednesses for nodes belonging to the same module and between nodes belonging to different modules. Three nestedness metrics are implemented in the function: NODF, WNODF and WNODA.
nest.smdm(x, constraints=NULL, weighted=FALSE, decreasing="fill", sort=TRUE)
module2constraints(mod)
Function returns a list with elements
Nestedness for rows
Nestedness for columns
Nestedness for entire matrix
If constraints are provided, e.g. based on computeModules
, output additionally includes:
Nestedness for rows belonging to the same modules
Nestedness for rows belonging to different modules
Nestedness for columns belonging to the same modules
Nestedness for columns belonging to different modules
Nestedness for nodes (rows and columns) belonging to the same modules
Nestedness for nodes (rows and columns) belonging to different modules
an interaction matrix; typically with rows for lower and columns for higher level species;
a vector with modules for vertices of the matrix. The vector indicates first rows modules and then columns modules, following the sequence of input matrix x. If no constraints are provided, the function calculates nestedness for the entire matrix, not taking into account possible network modules.
Logical. Indicate whether to calculate binary or weighted version of the metrics. If set to FALSE for a weighted input matrix, the binary metric is calculated, but a warning is returned.
The matrix has to be sorted before computation of (W)NODA. This can be done either by "fill", i.e. sum of cells with non-zero values, or "abund", i.e. sum of cell values. For a binary matrix decreasing needs to be "fill" (as no abundances are available). For weighted matrices, the argument may be "fill" (yielding WNODF) or "abundance" (yielding WNODA).
Logical. Should columns and rows of the matrix be sorted, in order to maximize nestedness index?
Output of a computeModules
-object. Returns a vector to be used as input for constraints.
Rafael Barros Pereira Pinheiro rafael-bpp@hotmail.com, Gabriel Felix, Marco Mello, and the team of the Ecological Synthesis Lab, University of São Paulo
Almeida-Neto M, Guimaraes PR, Guimaraes PR Jr, Loyola RD, Ulrich W (2008) A consistent metric for nestedness analysis in ecological systems: reconciling concept and measurement. Oikos 117: 1227--1239
Almeida-Neto, M. & Ulrich, W. (2011). A straightforward computational approach for measuring nestedness using quantitative matrices. Environ. Model. Softw. 26: 173--178
Felix, G.M., Pinheiro, R.B.P., Poulin, R., Krasnov, B.R. & Mello, M.A.R. (2017). The compound topology of a continent-wide interaction network explained by an integrative hypothesis of specialization. bioRxiv
Flores, C.O., Valverde, S. & Weitz, J.S. (2013). Multi-scale structure and geographic drivers of cross-infection within marine bacteria and phages. ISME J. 7: 520--532
vegan::nestedNODF
, computeModules
nest.smdm(Safariland)
nest.smdm(Safariland, weighted=TRUE)
nest.smdm(Safariland, weighted=TRUE, decreasing="abund")
nest.smdm(Safariland, weighted=TRUE, decreasing="abund", sort=FALSE)
# identify modules using computeModules:
mod <- computeModules(Safariland)
const <- module2constraints(mod)
nest.smdm(Safariland, constraint=const)
nest.smdm(Safariland, constraint=const, weighted=TRUE)
Run the code above in your browser using DataLab