Learn R Programming

bipartite (version 0.7)

compart: Detects compartments

Description

Finds number of compartments, based on multivariate ordination techniques, and labels interactions according to the compartment they belong to.

Usage

compart(web)

Arguments

web
A bipartite interaction web, i.e.~a matrix with higher (cols) and lower (rows) trophic levels.

Value

  • Returns a list with two entries:
  • cwebA matrix similar to web, but now with compartment numbers instead of interaction values.
  • ncompartThe number of compartments.

Details

Internal function, to be called by networklevel. The matrix web is diagonalised through CA-scores, then compartments are detected based on the distconnect-function from vegan, and the interactions are assigned to the compartments. Finally, the original data structure is reinstated and returned. The logic of using a CA before the analysis was based on a sentence somewhere in Lewinsohn et al.~(2006).

References

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

See Also

See also networklevel, distconnected and cca.

Examples

Run this code
# make a nicely compartet 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)

Run the code above in your browser using DataLab