Generate an abundance dataset, with or without environmental perturbance, by using generalized Lotka-Volterra

generateDataSet(samples, matrix, env.matrix = NULL,
  perturb.count = NULL, count = 1000, mode = 4)

Arguments

samples

Number of samples

matrix

Interaction matrix (generated from generateA.R)

env.matrix

Growth rate changes induced by environment; 1 column per environmental condition. Generate this matrix with envGrowthChanges.R

perturb.count

Number of samples per environmental condition. Sum should be equal to total number of samples.

count

Total number of individuals in dataset

mode

Mode for generateAbundances; default value samples counts from Poisson distribution with lambda count/N

Value

The abundance dataset

Examples

klemm = generateA(N=10, type="klemm", c=0.5)
#> [1] "Adjusting connectance to 0.5" #> [1] "Initial edge number 80" #> [1] "Initial connectance 0.777777777777778" #> [1] "Number of edges removed 25" #> [1] "Final connectance 0.5" #> [1] "Final connectance: 0.5" #> [1] "Initial edge number 55" #> [1] "Initial connectance 0.5" #> [1] "Number of negative edges already present: 10" #> [1] "Converting 18 edges into negative edges" #> [1] "Final connectance: 0.5" #> [1] "Final arc number (excluding self-arcs) 45" #> [1] "Final negative arc number (excluding self-arcs) 18" #> [1] "PEP: 60"
env = envGrowthChanges(species = 10, env.factors=2, conditions=2, strength=0.5) dataset = generateDataSet(100, klemm, env.matrix = env, perturb.count = c(50, 50))