Evaluating Common Indicators for Assessing Marine Protected Areas’ Effects on Conservation and Catches - Ovando & Lopazanski
This repository contains code needed to reproduce the results and manuscript.
- This repository is enabled with
renv, which will walk you through installing the required packages. Open R, ensure that your working directory is set to the location of the folder containing the repository information, and ensure that you have therenvpackage installed, then runrenv::restore().
-
You need R version >= 4.5
-
You need to have compiler tools installed. In Windows, that means RTools (https://cran.r-project.org/bin/windows/Rtools/), on macOS I recommend https://github.com/coatless-mac/macrtools#diagnose, Linux should be fine on its own.
-
If something goes wrong with
renv, the core dependency of this project that is not on CRAN can be installed withremotes::install_github("danovando/marlin") -
renvdoesn't always work perfectly, particularly on windows, so if you run into errors, check messages and try and resolve. When in doubt, 01_run_mpa_indicators.R and see where package errors come up and manually install whatever dependencies issues come up.
-
Once you've got packages up and running, run 01_run_mpa_indicators.R . This should take about 15 hours under the settings used in the paper (92 states, 8 cores)
-
Once the results are produced, knit 02_mpa_indicators_paper.qmd to reproduce the manuscript