Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

genweb

Generate a random bipartite web


Description

Generates a random bipartite web, based on r2dtable and lognormal marginal distributions.

Usage

genweb(N1 = 10, N2 = 30, dens = 2)

Arguments

N1

Number of species in the lower trophic level; or a vector of length 2 giving number of lower and higher trophic level species. Defaults to 10. Large values (>70) will take much longer!

N2

Number of species in the higher trophic level. Ignored if N1 a vector of length 2. Defaults to 30. Large values (>70) will take much longer!

dens

Interaction density, i.e. how many interactions there shall be, on average, for each link. Defaults to 2 (the median observed interaction density in the NCEAS pollination webs). Large values (> 10) will take much longer to find matrices for.

Details

This function can be used to create simple, but not necessarily realistic, bipartite webs for given dimensionality and interaction density. Marginal distributions are assumed to be lognormal, mean and standard deviation are calculated from N1, N2 and dens (see code for details).

Value

A matrix with N1 x N2 species.

Note

Can be a bit time-consuming for large webs, because the absolute values for both dimensions have to match perfectly. This involves a rather inelegant while-loop.

Author(s)

Jochen Fründ and Carsten F. Dormann

Examples

genweb()

bipartite

Visualising Bipartite Networks and Calculating Some (Ecological) Indices

v2.16
GPL
Authors
Carsten F. Dormann, Jochen Fruend and Bernd Gruber, with additional code from Stephen Beckett, Mariano Devoto, Gabriel Felix, Jose Iriondo, Tove Opsahl, Rafael Pinheiro, Rouven Strauss and Diego Vazquez, also based on C-code developed by Nils Bluethgen, Aaron Clauset/Rouven Strauss and Miguel Rodriguez-Girones
Initial release
2021-02-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.