-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
66 lines (38 loc) · 2.21 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# Policy Implications of Coupled Economic and Ecological Dynamics in Aquatic Systems
Paper Introducing the `marlin` package.
## renv
This repository is equipped with [`renv`](https://rstudio.github.io/renv/) for package management.
To install all dependencies for this project
1. Open R
2. Make sure you have `renv` installed (if not, `install.packages("renv")`)
3. Inside R, making sure the working directory is set to the root directory of this repository, run `renv::restore()`
4. Follow all prompts. This will install local versions of all the dependencies needed for this project
5. If you have trouble installing `marlin`, see instructions [here](https://danovando.github.io/marlin/#installation-troubleshooting)
## Navigating Repo
THe main scripts needed to reproduce results are
1. 00_setup.R
2. 01_coral_case_study.R
3. 02_blue_water_cast_study.R
4. 03_marlin_paper.qmd
The best way to reproduce the results is through the `make` commands described below. To reproduce results manually, first open 00_setup.R and set parameters as desired. Then, run 01_.. 02_... and 03_.
## Knitting to PDF
Note that if you want to knit to PDF you'll need to have appropriate LaTeX style software installed. I recommend [`tinytex`](https://yihui.org/tinytex/).
## Reproducing results on UNIX machines
This repo is equipped with a `make` file. To reproduce results this way
1. Make sure you have make installed
2. Open a terminal and make sure the working directory of the terminal is set to the location of this repo
3. Make sure you have all dependencies installed by opening R and running `renv::restore()`
4. In the terminal, run `RUN_NAME="MYRUNNAME" FORMAT="FORMAT" make` where MYRUNNAME is the name of the folder you want to create to store results (e.g. v0.1) and FORMAT is one of pdf, html, or docx
5. Wait for a bit! This command will run all the required scripts and knit the paper. Shouldn't take more than an hour on a reasonable computer with parallel computation capabilities.