shuffle.web: Shuffle web entries

Description Usage Arguments Details Value Note Author(s) References See Also Examples


Shuffles (= relocates) entries in a web matrix whilst maintaining the dimensionality.


shuffle.web(web, N, legacy=TRUE)



An interaction matrix.


Number of desired shuffled matrices.


Logical; use the old or new algorithm? Defaults to TRUE, i.e. the old algorithm. The new algorithm was written by Paul Rabie and is about 3 times faster (due to avoiding a loop). For consistency reasons, the old, slow algorithm remains the default.


This function is designed to behave similar to r2dtable, i.e. it returns a list of randomised matrices. In contrast to r2dtable is does not keep marginal sums constant!

This function is thought of as a null model for the analysis of bipartite webs. It keeps two web properties constant: The number of interactions and the number of links (and hence connectance). A comparison of shuffle.web- and r2dtable-based webs allows to elucidate the effect of marginal sums.


A list of N randomised matrices with the same dimensions as the initial web.


shuffle.web is not an extremely intelligent nullmodel. You may want to think of a better one for your specific application!


Carsten F. Dormann <>


This null model can be thought of as a quantitative version of Fortuna & Bascompte (2006) “null model 1”:

Fortuna, M. A., and J. Bascompte. 2006. Habitat loss and the structure of plant-animal mutualistic networks. Ecology Letters 9: 281-286.

For a very nice and thorough overview of null models in general see:

Gotelli, N. J., and G. R. Graves. 1996. Null Models in Ecology. Smithsonian Institution Press, Washington D.C.

For null models and their application to webs/networks see, e.g.:

Vázquez, D. P., and M. A. Aizen. 2003. Null model analyses of specialization in plant-pollinator interactions. Ecology 84: 2493-2501.

Vázquez, D. P., C. J. Melian, N. M. Williams, N. Blüthgen, B. R. Krasnov, and R. Poulin. 2007. Species abundance and asymmetric interaction strength in ecological networks. Oikos 116: 1120-1127.

See Also




Search within the bipartite package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

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

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