The Theory of Ecological Communities
R code for Chapter 6: Simulating Dynamics in Ecological Communities
By: Andrew MacDonald & Mark Vellend
Book by Mark Vellend, 2016, Princeton University Press
Notes:
Chapter 6 in "The Theory of Ecological Communities" contains simulations of the dynamics of simple ecological communities. Provided here is the annotated R code with which readers can get started with simulations of their own. Code can be cut and paste from these web pages directly into an R script.
Boxes 3 and 4 have parameter values set to match those in one particular figure. For all other Boxes, readers are required to alter parameter values in order to match particular figures of figure panels. Relevant parameter values are described in each Box.
Contributions: Mark Vellend wrote the basic R code for running simulations. Andrew MacDonald used R Markdown to produce the vignettes that appear in these htm files, the revision of which was done collaboratively.
Click the links below to see the R code.
Online Box 1. R code for simulating neutral dynamics in a local, two-species community.
Online Box 3. R code to simulate temporally fluctuating selection: Figure 6.4.
*ADDENDUM to Online Box 5 (by Melissa Chen): Unexpected behaviour during high dispersal
*ADDENDUM to Online Box 6 (by Melissa Chen): Alterations to code to account for competition and colonization at high dispersal
Online Box 7. R code to simulate a neutral model in one large community with speciation: Figure 6.11.
Online Box 8. R code to simulate the Theory of Island Biogeography: Figure 6.12 in the book.