Modeling Community Population Dynamics with the Open-Source Language R
The ability to explain biological phenomena with mathematics and to generate predictions from mathematical models is critical for understanding and controlling natural systems. Concurrently, the rise in open-source software has greatly increased the ease at which researchers can implement their own mathematical models. With a reasonably sound understanding of mathematics and programming skills, a researcher can quickly and easily use such tools for their own work. The purpose of this chapter is to expose the reader to one such tool, the open-source programming language R, and to demonstrate its practical application to studying population dynamics. We use the Lotka–Volterra predator–prey dynamics as an example.
Key wordsModeling R Lotka–Volterra Population dynamics Predator–prey relationship
The authors would like to thank members of the Shou lab (Björn F.C. Kafsack, David Skelding, Babak Momeni and Adam Waite), Sarah Holte, Jerry Davison, and Alex Hu for their critical feedback and insightful comments. Work in the W.S. group is supported by the W. M. Keck Foundation and the National Institutes of Health (Grant 1 DP2OD006498-01). R.G. is an NSF predoctoral fellow.
- 1.Malthus T (1798) An essay on the principle of population: an essay on the principle of population, as it affects the future improvement of society with remarks on the speculations of Mr. Godwin M, Condorcet and other writers. Electronic Scholarly Publishing, London, http://www.esp.org/books/malthus/population/malthus.pdf
- 2.Venables WN, Smith DM (2013) The R Core team. An introduction to R-Notes on R: a programming environment for data analysis and graphics version 3.0.1 (2013-05-16). http://www.cran.r-project.org/doc/manuals/R-intro.pdf
- 3.Lotka AJ (1925) Elements of physical biology. Williams & Wilkins, Baltimore, MDGoogle Scholar
- 5.Soetaert K, Petzoldt T, Setzer RW (2010) Solving differential equations in R. R J 2(2):5–15Google Scholar
- 6.Soetaert K, Petzoldt T, Setzer S (2010) Solving differential equations in R: package deSolve. J Stat Softw 33(9):1–25Google Scholar
- 7.Hindmarsh A (1983) ODEPACK, a systematized collection of ODE solver (Stepleman R, et al. ed). IMACS Trans Sci C Comput 1:55–64Google Scholar