-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
55 lines (44 loc) · 2.04 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
---
output:
md_document:
variant: markdown_github
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# Improving estimates of population status and trend with superensemble models
[![DOI](https://zenodo.org/badge/33008246.svg)](https://zenodo.org/badge/latestdoi/33008246)
This repository holds the analysis for:
Anderson, S. C., A. B. Cooper, O. P. Jensen, C. Minto, J. T. Thorson, J. C. Walsh, M. Dickey-Collas, K. M. Kleisner, C. Longo, G. C. Osio, D. Ovando, I. Mosqueira, A. A. Rosenberg, and E. R. Selig. 2017. Improving estimates of population status and trend with superensemble models. Fish and Fisheries. In press.
To recreate the analysis, source the `.R` files in the `analysis` folder in order. Or run the following in R:
```{r}
packages <- c("mblm", "randomForest", "plyr", "dplyr", "ggplot2",
"reshape2", "gbm", "devtools", "doParallel", "hexbin", "pROC",
"RColorBrewer", "Rcpp", "R2jags", "arm", "bbmle")
```
```{r, eval=FALSE}
install.packages(packages)
devtools::install_github("datalimited/datalimited")
# start in the root "ensembles" folder, then:
setwd("analysis")
source("0-ensemble-functions.R")
source("1-read-old-ram-fits.R")
source("2-merge-ram-fits.R")
source("3-load-sim-data.R")
source("4-add-spectral.R")
source("5-simulation-ensembles.R")
source("6-sim-to-ram.R")
source("7-plot-sims.R")
source("8-main-figs.R")
source("8-motivate-fig.R")
source("9-output-values.R")
```
Generated data ends up in `analysis/generated-data` and figures in `figs`. Intermediate versions of some raw data have been cached in the `analysis/generated-data` folder so that the scripts will run from a freshly cloned version of this repository. (Some of the raw data files are too large for Git.)
## Package versions used:
```{r, echo=FALSE}
packages <- c("datalimited", packages)
x <- suppressPackageStartupMessages(lapply(packages, library, character.only = TRUE))
x <- devtools::session_info()
dplyr::filter(x$packages, package %in% packages) %>%
dplyr::arrange(package) %>%
dplyr::select(-source, -`*`) %>%
knitr::kable()
```