Repository navigation
Expand file tree
/
Copy pathREADME.Rmd
More file actions
55 lines (37 loc) · 3.12 KB
/
Copy pathREADME.Rmd
File metadata and controls
55 lines (37 loc) · 3.12 KB
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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
<!-- badges: start -->
<!-- [](https://github.com/BrunaLab/lagged-ipms/actions/workflows/pages/pages-build-deployment) -->
<!-- DOI badges go here -->
<!-- badges: end -->
This repository contains data and code for the manuscript *"Context-dependent consequences of including delayed responses to climate in Integral Projection Models"* <!-- by Eric R. Scott, María Uriarte, and Emilio M. Bruna. -->
We investigated the consequences of including lagged effects, such as those modeled by distributed lag non-linear models, into integral projection models (i.e., IPMs). We compared population growth rates projected with deterministic IPMs, stochastic IPMs (using 'matrix-shuffling'), and stochastic IPMs with lagged effects.
# Reproducibility
This research compendium has been developed using the statistical programming language R. To work with the compendium, you will need installed on your computer the [R software](https://cloud.r-project.org/) (v4.3 for best compatibility) itself and [RStudio Desktop](https://rstudio.com/products/rstudio/download/).
You can download the compendium as a zip file from from this URL: [master.zip](/archive/master.zip).
To run the compendium and reproduce all outputs:
- Open the project in RStudio by double-clicking the `.Rproj` file.
- This project uses `renv` for package management, which should be installed automatically when opening the project. Run `renv::restore()` to install all required packages (this will have the highest likelihood of succeeding if run on R v4.3.0).
- You can run `renv::deactivate()` if you want to turn of `renv` but keep the lockfile as a record of package versions used.
- This project uses `targets` for workflow management. The functions used in the project are defined in `R/` and the steps are defined in `_targets.R` and summarized in the schematic below. Run `targets::tar_make()` or `targets::tar_make_clustermq()` from the R console to run all code and produce all outputs.
```{r echo=FALSE, message=FALSE, warning=FALSE, results='asis'}
cat(
"```mermaid",
targets::tar_mermaid(targets_only = TRUE),
"```",
sep = "\n"
)
#this should display correctly on GitHub, or code can be pasted into https://mermaid.live
```
<!-- There is some additional technical information for collaborators on the ['notes for collaborators' page](https://brunalab.github.io/lagged-ipms/notes/index.html). The most recent draft of the manuscript is available [here](https://brunalab.github.io/lagged-ipms/docs/ipm_comparison_ms.pdf). -->
### NOTES:
- The targets `lambda_bt_dlnm_ff` and `lambda_bt_dlnm_cf` will take a very long time to run (days), so you may want to comment those out before attempting to reproduce results.
<!-- - If you want to make use of HPC, follow instructions [here](https://github.com/BrunaLab/hipergator-targets-ssh) to customize templates and options. -->