Dataset Open Access

Code and data for "Optimising habitat management for amphibians: from simple models to complex decisions"

Scroggie, Michael P.; Preece, Kathy; Nicholson, Emily; McCarthy, Michael A.; Parris, Kirsten M.; Heard, Geoffrey W.

The zip archive contains code and data to reproduce the analysis contained in the following manuscript:

Scroggie, M.P., Preece, K., Nicholson, E., McCarthy, M.A., Parris, K.M. and Heard, G.W. Optimising habitat management for amphibians: from simple models to complex decisions.

Included in the archive is the source code of two R packages (METAPOP, and METAPOPPLAN), which must first be installed, along with their various dependencies which include Rcpp, RcppArmadillo, sp, spdep and rgeos. As package METAPOPPLAN contains C++ code, installation requires the presence of the appropriate C++ compilers and other software development tools. These should be available or easily installable on Linux or other Unix based systems, but Microsoft Windows users must first install the appropriate version of Rtools, which can be downloaded from

With all appropriate packages installed, the analysis can be replicated by running the included Makefile.

Total execution time will be quite long, due to the large number of simulations that must be run. On my Windows system, with 12 cores and 4GB of RAM, execution took approximately 10 days. The code will run much faster if the various management scenarios included in the analysis are executed in parallel. This can be done by executing make with a -j argument specifying the number of cores to utilise. For example, if your system has 12 cores, invoke *make* as follows:

make -j 12

Overall execution time will scale roughly with the number of available cores, up to a maximum of 24 (the total number of management scenarios).

Files (22.6 MB)
Name Size
22.6 MB Download
All versions This version
Views 125125
Downloads 1515
Data volume 339.7 MB339.7 MB
Unique views 111111
Unique downloads 1414


Cite as