Generate a matrix of growth changes for different environmental conditions. This vector can be supplied to generateDataSet to introduce environmental perturbation in the dataset. Note that the effect of environmental parameters is already summed, so only one growth change is provided per species per condition.
envGrowthChanges(species, env.factors = 2, conditions = 2, strength)
species | Number of species |
---|---|
env.factors | Number of environmental factors |
conditions | Number of environmental conditions |
strength | Strength of environmental factors |
Matrix of growth changes, 1 column per condition.
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))#> Error in env.matrix[1, ]: incorrect number of dimensions