The neutral community model of Stephen Hubbell.
1 |
nspecies |
Integer. Number of species to be simulated. |
gridsize |
Integer. Edge lenth of the grid. |
time |
Time steps to be simulated. |
pdf |
If TRUE, a pdf file will be produced for each time step. |
plotpop |
If TRUE, a plot of the population dynamics over time will be provided in the end of the simulation. |
sleep |
Value for function Sys.sleep(). |
density |
Density dependen reproduction TRUE/FALSE |
liveplot |
If TRUE, world is plotted during the simulation. Default is TRUE. |
Matrix with population sizes for each time step. Klara Dolos [Duncan Golicher's weblog](http://duncanjg.wordpress.com/2008/03/07/a-simple-illustration-of-an-ecological-lottery-model-in-r/)
mat <- neutral_community_model(nspecies=8, gridsize=20, time=10, pdf=FALSE, plotpop=TRUE, sleep=0.3, density=FALSE)
mat_dens <- neutral_community_model(nspecies=8, gridsize=20, time=10, pdf=FALSE, plotpop=TRUE, sleep=0.3, density=TRUE)
par(mfrow=c(2,1), mar=c(0,0,0,0), oma=c(5,4,1,1)) matplot(mat, type="l", axes=F, ylim=c(0, max(c(mat), mat_dens))) axis(2); box() matplot(mat_dens, type="l", ylim=c(0, max(c(mat), mat_dens)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.