-
Notifications
You must be signed in to change notification settings - Fork 1
/
load.R
41 lines (35 loc) · 1.37 KB
/
load.R
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
## Load packages
suppressPackageStartupMessages(library(data.table))
suppressPackageStartupMessages(library(ggplot2))
suppressPackageStartupMessages(library(rstanarm))
suppressPackageStartupMessages(library(loo))
suppressPackageStartupMessages(library(brms))
suppressPackageStartupMessages(library(rstan))
suppressPackageStartupMessages(library(bayesdfa))
suppressPackageStartupMessages(library(sf))
suppressPackageStartupMessages(library(mgcv))
suppressPackageStartupMessages(library(raster))
suppressPackageStartupMessages(library(colorspace))
suppressPackageStartupMessages(library(patchwork))
suppressPackageStartupMessages(library(rjags))
suppressPackageStartupMessages(library(R2jags))
suppressPackageStartupMessages(library(codatools))
suppressPackageStartupMessages(library(bayesplot))
library(readxl)
library(ggsimple) ## see: https://github.com/michaelmalick/ggsimple
library(MARSS)
library(rnaturalearth)
library(rnaturalearthhires)
library(grid)
library(stringr)
dir.create("./figures/", showWarnings = FALSE)
dir.create("./outputs/", showWarnings = FALSE)
source("./functions.R")
source("./stan_utils.R")
M1 <- c("#00A0ED", "#DF1E7F", "#EAA301", "#6A4EE2", "#FF6000", "#000000")
M1d <- colorspace::darken(M1, amount = 0.2)
## Load output data
for(i in list.files(path = "./outputs/", pattern = "*.RData$")) {
load(paste("./outputs/", i, sep = ""))
}
proj_wgs <- 4326 ## WGS84