rick.stoch | R Documentation |
This function generates stochastic population abundances for a nSpp species.
rick.stoch(nSpp, tMax, r, N, K, sd)
nSpp |
The number of species to be simulated |
tMax |
The number of time steps to include in the simulation |
r |
Vector (length nSpp) of the average intrinsic growth rate for each species |
N |
Matrix (nrow=tMax, ncol=nSpp) to store abundances; N[1,] must be initialized |
K |
Vector (length nSpp) of the carrying capacity for each species |
sd |
Vector (length nSpp) of the standard deviation in annual growth rate for each species |
Updated matrix N with simulated abundances
nSpp <- 3; tMax <- 20
r <- runif(3, 0.75, 1.25)
sd <- runif(3, 0.001, 2)
K <- runif(3, 100, 200)
N <- matrix(nrow=tMax, ncol=nSpp)
N[1,] <- K
N <- rick.stoch(nSpp, tMax, r, N, K, sd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.