-
Notifications
You must be signed in to change notification settings - Fork 4
/
_setupPkgs.R
29 lines (25 loc) · 1.05 KB
/
_setupPkgs.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
## Setup - packages
if (!isTRUE(as.logical(Sys.getenv("CI")))) {
pkgPath <- normalizePath(file.path("packages", version$platform,
paste0(version$major, ".", strsplit(version$minor, "[.]")[[1]][1])),
winslash = "/")
dir.create(pkgPath, recursive = TRUE)
.libPaths(pkgPath, include.site = FALSE)
}
if (!"remotes" %in% installed.packages())
install.packages("remotes")
if (!"Require" %in% installed.packages() || packageVersion("Require") < "0.3.1.9015") {
remotes::install_github("PredictiveEcology/Require@2788b023ad191c29346ef8c64df71b937be307e2",
upgrade = FALSE)
}
Require::Require(c(
"htmlwidgets", "geodata",
"ropensci/NLMR",
"SpaDES",
# "PredictiveEcology/SpaDES.experiment@75d917b70b892802fed0bbdb2a5e9f3c6772f0ba",
"ggpubr", "rmarkdown", "rsvg",
"formatR" ## for tidy = TRUE option
),
require = FALSE, ## don't load packages
upgrade = FALSE, ## don't upgrade dependencies
standAlone = ifelse(isTRUE(as.logical(Sys.getenv("CI"))), FALSE, TRUE))