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)

Arguments

species

Number of species

env.factors

Number of environmental factors

conditions

Number of environmental conditions

strength

Strength of environmental factors

Value

Matrix of growth changes, 1 column per condition.

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))
#> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 0.0780007, R2 = 6.68149e-18 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 0.0780007, R2 = 6.68149e-18 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 0.0780007, R2 = 6.68149e-18 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 0.0780007, R2 = 5.46802e-18 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 0.0780007, R2 = 5.46802e-18 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 0.0780007, R2 = 5.46802e-18 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 0.0780007, R2 = 4.47494e-18 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 0.0780007, R2 = 4.47494e-18 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 0.0780007, R2 = 4.47494e-18 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 0.0780007, R2 = 3.66222e-18 #> #> DLSODA- Above warning has been issued I1 times. #> It will not be issued again for this problem. #> In above message, I1 = 10 #> #> DLSODA- At current T (=R1), MXSTEP (=I1) steps #> taken on this call before reaching TOUT #> In above message, I1 = 5000 #> #> In above message, R1 = 0.0780007 #>
#> Warning: an excessive amount of work (> maxsteps ) was done, but integration was not successful - increase maxsteps
#> Warning: Returning early. Results are accurate, as far as they go
#> Error in series[, 1001]: subscript out of bounds