species_combo: SpeciesCombo Co-occurrence Metric

Description Usage Arguments Details Value Note References Examples

View source: R/metrics.R


Function to calculate number of unique species combinations in a matrix


species_combo(m = matrix(rbinom(100, 1, 0.5), nrow = 10))



a binary presence-absence matrix in which rows are species and columns are sites.


In Diamond's (1975) assembly rules model, species interactions lead to certain "forbidden combinations" of species. A set of communities structured this way should contain fewer species combinations than expected by chance.


Returns the number of unique species combinations represented by the different columns (= sites) in the matrix.


This metric is most useful when the number of sites (= columns) is relatively large compared to the number of species (= rows). Empty sites are excluded from the matrix and are not counted as a unique species combination.


Diamond, J.M. 1975. Assembly of species communities. p. 342-444 in: Ecology and Evolutoin of Communities. M.L. Cody and J.M. Diamond (eds.). Harvard University Press, Cambridge.

Pielou, D.P. and E.C. Pielou. 1968. Association among species of infrequent occurrence: the insect and spider fauna of Polyporus betulinus (Bulliard) Fries. Journal of Theoretical Biology 21: 202-216.


obsCombo <- species_combo(m=matrix(rbinom(100,1,0.5),nrow=10))

EcoSimR documentation built on May 19, 2017, 7:40 p.m.
Search within the EcoSimR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.