Finds number of compartments, based on multivariate ordination techniques, and labels interactions according to the compartment they belong to.
A bipartite interaction web, i.e.~a matrix with higher (cols) and lower (rows) trophic levels.
Internal function, to be called by
Returns a list with two entries:
A matrix similar to
The number of compartments.
Note that up to (and including) version 0.85 we used a code based on correspondence analysis (see Lewinsohn et al. 2006). This is, however, faulty for webs with many same-linked species. Hence we resorted to a brute-force search for compartments, which is orders of magnitude slower, but at least works correctly. Only in version 1.18 Juan M. Barreneche eventually found a solution that is fast and works with ties!
Juan M. Barreneche <firstname.lastname@example.org>, but please co-copy comments/questions to package maintainer: Carsten F. Dormann <email@example.com>
Lewinsohn, T. M., P. I. Prado, P. Jordano, J. Bascompte, and J. M. Olesen (2006) Structure in plant-animal interaction assemblages. Oikos 113, 174–184
1 2 3 4 5 6 7 8 9 10 11 12 13
# make a nicely comparted web: web <- matrix(0, 10,10) web[1,1:3] <- 1 web[2,4:5] <- 1 web[3:7, 6:8] <- 1 web[8:10, 9:10] <- 1 web <- web[-c(4:5),] #oh, and make it asymmetric! web <- web[,c(1:5, 9,10, 6:8)] #oh, and make it non-diagonal compart(web) # or, standard, use Safariland as example: data(Safariland) compart(Safariland)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.