Multi-Species sIZE Spectrum Modelling in R

A set of classes and methods to set up and run multi-species, trait based and community size spectrum ecological models, focused on the marine environment.

mizer is a package that implements size-based ecological models. The package has been developed to model marine ecosystems that are subject to fishing. However, it may also be appropriate for other ecosystems.

The package contains routines and methods to allow users to set up the model community, and then project it through time under different fishing strategies.

Methods are included to explore the results, including plots and calculation of community indicators such as the slope of the size spectrum. Size-based models can be complicated so mizer contains many default options that can be easily changed by the user.

The package is on CRAN and therefore available from R's build-it package manager.

See the accompanying vignette for more details on how the package works, including detailed examples.


Travis-CI Build Status


mizer 1.0.1

  • Made compatible with older versions of R > 3.1.0
  • Skipping a test on CRAN that fails on some machines with different precision

mizer 1.0

  • Fixed bugs in how the start time of a simulation was handled. This leads to small corrections, so that the output of this version is slightly different from previous versions.
  • Introduced a scale-invariant trait-based model, set up with set_scaling_model(), see section 12 in the vignette.
  • Added a function that adds news species to a scale-invariant background, and computes an approximately steady state close to the power law, see section 13 in the vignette.
  • Created an example shiny app to allow people to use mizer through a web browser without having to install mizer. The app explores the effect of more selective fishing gear in a case study.
  • project() now shows a progress bar while simulation is running.
  • Improvements to plots: -- Added units to axes -- Added method for plotting growth curves -- PlotYield no longer fails when species names are numbers or when a species abundance is zero -- Added a "total" parameter to several plot methods to add the curve for the total community (sum over all species and plankton) -- Added a "species" parameter to all plot methods to allow for only a selection of species to be plotted -- Allow the number of ticks on y-axis in biomass plot to be controlled
  • Allow for size- and species-dependent background death.
  • Add initial_n and initial_n_pp slots to mizer params.
  • Now checking that effort times are increasing.
  • Corrections in the documentation.
  • Improvements to the vignette.
  • Fix potential problems with negative numbers due to numerical errors.
  • Fix a bug in the divisibility checks.
  • Add a test of the numeric solution against an analytic solution.

mizer 0.4

  • Improvements made to the speed by evaluating convolution sums via fft, removing the bottlenecks in getPhiPrey() and getPredRate().
  • Using C++ for the inner loop in the project method for extra speed.
  • Minor corrections to vignette and documentation to bring them into alignment and to document the new home on github and new maintainers.

mizer 0.3

  • Improvements made to the speed of the simulations. Remaining bottle necks are the sweep statements in getPhiPrey() and getPredRate().
  • Moved tests to new suggested folder.
  • Minor changes to documentation to pass new check requirements.

mizer 0.2

  • Release to coincide with the submission of the MEE paper. No major changes. Just minor bug fixes.

mizer 0.1

  • Beta release - just about works but still some gremlins to sort out. There are a number of features I'd like to add in the coming relases.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("mizer") by Gustav Delius, 4 months ago,

Report a bug at

Browse source code at

Authors: Gustav Delius [cre, aut, cph] , Finlay Scott [aut, cph] , Julia Blanchard [aut, cph] , Ken Andersen [aut, cph] , Richard Southwell [ctb, cph]

Documentation:   PDF Manual  

GPL-3 license

Imports assertthat, deSolve, dplyr, ggplot2, ggrepel, grid, lubridate, methods, plotly, plyr, progress, Rcpp, reshape2, rlang, lifecycle

Suggests testthat, vdiffr, roxygen2, knitr, shinyBS, rmarkdown, pkgdown, covr, spelling

Linking to Rcpp

See at CRAN