This respository contains code accompanying the manuscript "Metapopulations with habitat modification" by Zachary R. Miller and Stefano Allesina. The file functions.R contains an implementation of the models described in the text, suitable for numerical integration, along with other useful functions for generating figures and analysis. The file figures_main.R generates all figures shown in the Main Text, while figures_SI.R generates all figures shown in the Supporting Information. Simulations described in the Supporting Information (without associated figures) are implemented in simulations_SI.R.
Please email zachmiller@uchicago.edu with any questions.