-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0_setup.R
26 lines (20 loc) · 1.2 KB
/
0_setup.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
#--------------------------------------------------------------------------------
# setup.R Setup project
#--------------------------------------------------------------------------------
# set computer
cpu <- "laptop" # "pc", "mac". "server"
# Set main data paths
if(cpu == "laptop") main_dir <- "C:/YOUR_PATH"
# 2. Create data paths
input_data <- paste(main_dir, "input", sep="/")
if (!dir.exists(input_data)) dir.create(input_data, recursive = TRUE)
output_data <- paste(main_dir, "output", sep="/")
if (!dir.exists(output_data)) dir.create(output_data, recursive = TRUE)
# Load required packages
pacman::p_load(dplyr, raster, sf, lubridate, ggplot2, rnaturalearth, rnaturalearthdata, CopernicusMarine, doParallel,
beepr, tidyverse, dplyr, move, data.table, splitstackshape, Hmisc, dismo, scam, tidyr, parallel,
egg, gifski, ncdf4, ramify, ecmwfr, av, gganimate, foreach, stringr, groupdata2, ggBRT, fmsb,
reshape2, gbm, devtools, rJava, animalsensor, availability, moments, magrittr, grid, corrplot,
nlme, ape, caper, car, bbmle, install = FALSE)
#devtools::install_github("JBjouffray/ggBRT") # will take several minutes to install
library(ggBRT)