generate_er_basal: Generate directed Erdos-Renyi random networks with at least 1...

View source: R/models.r

generate_er_basalR Documentation

Generate directed Erdos-Renyi random networks with at least 1 basal node and only one component

Description

This uses the igraph's function sample_gnm to generate nsim random networks with the same number of nodes and links than the parameter ig and two restrictions:

  1. at least one basal species/node, that is a species that has no prey, 2) 1 connected component so there is no disconnected species or sub-community.

Usage

generate_er_basal(ig, nsim = 1000)

Arguments

ig

igraph object with parameters to use in the random network simulations: number of species/nodes and number of links/edges

nsim

number of simulations

Value

a list with igraph objects

Examples


generateERbasal(netData[[1]])

lsaravia/EcoNetwork documentation built on March 20, 2024, 3:27 p.m.