generateDataSet: Generate a dataset

View source: R/generateDataSet.R

generateDataSetR Documentation

Generate a dataset

Description

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

Usage

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)
env = envGrowthChanges(species = 10, env.factors=2, conditions=2, strength=0.5)
dataset = generateDataSet(100, klemm, env.matrix = env, perturb.count = c(50, 50))

hallucigenia-sparsa/seqtime documentation built on Jan. 9, 2023, 11:53 p.m.