Function to generate a food web based on the niche model (Williams and Martinez, 2000) based on the number of species and connectance. Corrections from Allesina et al. (2008) are used.
create_niche_model(S, C)
Arguments
S: integer, number of species.
C: numeric, connectance i.e. the number of realized links over the all possible links.
Returns
A (square) matrix with zeros (no interaction) and ones (species j consume species i).
Details
If at least one species has not resource or consumer (i.e. it is an isolated species), another food web is generated, until a maximum of 100 iterations.