Keywords: Environmental model, differential equation, model-data comparison, visualisation.


The tutorial will show users practical examples of how we apply R to understand environmental processes, and how they are used for prediction. Our models belong to the category of dynamic models, that simulate the “life” of natural and technical systems in space and time. The examples vary from very simple, small-scale applications (level of cell or organism) up to complex spatiotemporal models. We will also explain how we use data in conjunction with models for model calibration and validation.


The tutorial will consist of two parts, an introductory part and a “modular” outlook:

Introductory part

  • basic R packages for differential equation models: deSolve (Soetaert, Petzoldt, and Setzer 2010), ReacTran (Soetaert and Meysman 2012), simecol (Petzoldt and Rinke 2007), …
  • useful R packages for specific applications: marelac (Soetaert, Petzoldt, and Meysman 2017), AquaEnv (Hofmann et al. 2010)
  • R packages for model-data comparison, FME (Soetaert and Petzoldt 2010), …


A selection of more advanced features, dependent on the interest of the participants:

  • how to make models more realistic by implementing forcing functions and events,
  • how to implement complex models in an efficient way with package rodeo (Kneis 2017),
  • how to speed up differential equation models (matrix formulation, code generators, parallel computing),
  • how to visualise complex (e.g. 4-D) model output, using the R-package [plot3D] ( (Soetaert 2017)
  • how to create web-based model applications with deSolve and shiny (Chang et al. 2016).

We will provide reproducible example cases, which the user will be allowed to experiment with. more …


Knowledge of R is assumed; prior knowledge with differential equation models is recommended but not mandatory. Potential attendees are people involved in dynamic simulation models, or intending to start using these tools. Background information and material are available at the deSolve-homepage at R-Forge.


Karline Soetaert and Thomas Petzoldt are both biologists, working in the field of oceanography (KS) or limnology (TP). They have developed several R-packages for environmental modelling, working together (deSolve, FME, marelac) or individually (KS: ReacTran - TP: simecol). Both are active in teaching this subject, making use of R, and regularly give tutorials on the topic.


Chang, Winston, Joe Cheng, JJ Allaire, Yihui Xie, and Jonathan McPherson. 2016. shiny: Web Application Framework for R.

Hofmann, Andreas F., Karline Soetaert, Jack J. Middelburg, and Filip J. R. Meysman. 2010. “AquaEnv - an Aquatic Acid-Base Modelling Environment in R.” Aquatic Geochemistry. doi:10.1007/s10498-009-9084-1.

Kneis, David. 2017. rodeo: A Code Generator for Ode-Based Models.

Petzoldt, Thomas, and Karsten Rinke. 2007. “simecol: An Object-Oriented Framework for Ecological Modeling in R.” Journal of Statistical Software 22 (9): 1–31. doi:10.18637/jss.v022.i09.

R Core Team. 2016. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing.

Soetaert, Karline. 2017. Plot3D: Plotting Multi-Dimensional Data.

Soetaert, Karline, and Filip Meysman. 2012. “Reactive Transport in Aquatic Ecosystems: Rapid Model Prototyping in the Open Source Software R.” Environmental Modelling & Software 32: 49–60. doi:10.1016/j.envsoft.2011.08.011.

Soetaert, Karline, and Thomas Petzoldt. 2010. “Inverse Modelling, Sensitivity and Monte Carlo Analysis in R Using Package FME.” Journal of Statistical Software 33 (3): 1–28. doi:10.18637/jss.v033.i03.

Soetaert, Karline, Thomas Petzoldt, and Filip Meysman. 2017. Marelac: Tools for Aquatic Sciences.

Soetaert, Karline, Thomas Petzoldt, and R. Woodrow Setzer. 2010. “Solving Differential Equations in R: Package deSolve.” Journal of Statistical Software 33 (9): 1–25. doi:10.18637/jss.v033.i09.