-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.R
57 lines (39 loc) · 1.87 KB
/
make.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#' Caribou-Demographic-Projection-Paper: A Research Compendium
#'
#' @description
#' A paragraph providing a full description of the project and describing each
#' step of the workflow.
#'
#' @author Sarah Endicott \email{sarah.endicott@canada.ca}
#'
#' @date 2023/02/16
# I copied these from the rocker/r-bspm Dockerfile because it sets them in the
# RProfile but it wasn't working
bspm::enable()
options(pkgType="binary", install.packages.check.source = "no")
utils::install.packages("remotes", dependencies = TRUE)
## Install Dependencies (listed in DESCRIPTION) ----
print("install deps")
try(remotes::install_deps("/Caribou-Demographic-Projection-Paper", upgrade = "never"))
try(remotes::install_deps("/Caribou-Demographic-Projection-Paper", type = "source",
upgrade = "never"))
message("install caribouMetrics from GitHub")
# do deps separately so they can be installed from binaries
# only do download once
cm_download <- remotes::remote_download(remotes::github_remote("LandSciTech/caribouMetrics"))
try(remotes::install_deps(cm_download, upgrade = "never"))
# this should do ones that were not available from binary
try(remotes::install_deps(cm_download, type = "source", upgrade = "never"))
try(remotes::install_local(cm_download,
type = "source", dependencies = FALSE, upgrade = "never"))
## Load Project Addins (R Functions and Packages) ----
# devtools::load_all(here::here())
## Global Variables ----
# You can list global variables here (or in a separate R script)
## Run Project ----
# List all R scripts in a sequential order and using the following form:
# source(here::here("analyses", "script_X.R"))
# code to make commands for all batches to use in bash script
# cat(paste0('nohup Rscript "Caribou-Demographic-Projection-Paper/analysis/scripts/sensitivityMinimal.R" ',
# 1:24,
# ' "cloud"', sep = "\n"))