forked from magpiemodel/magpie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rprofile
25 lines (21 loc) · 1.08 KB
/
.Rprofile
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
# | (C) 2008-2023 Potsdam Institute for Climate Impact Research (PIK)
# | authors, and contributors see CITATION.cff file. This file is part
# | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of
# | AGPL-3.0, you are granted additional permissions described in the
# | MAgPIE License Exception, version 1.0 (see LICENSE file).
# | Contact: magpie@pik-potsdam.de
Sys.setenv(RENV_PATHS_LIBRARY = "renv/library")
source("renv/activate.R")
if (!"https://rse.pik-potsdam.de/r/packages" %in% getOption("repos")) {
options(repos = c(getOption("repos"), pik = "https://rse.pik-potsdam.de/r/packages"))
}
# bootstrapping, will only run once after this repo is freshly cloned
if (isTRUE(rownames(installed.packages(priority = "NA")) == "renv")) {
message("R package dependencies are not installed in this renv, installing now...")
renv::hydrate() # auto-detect and install all dependencies
message("Finished installing R package dependencies.")
}
# source global .Rprofile (very important to load user specific settings)
if (file.exists("~/.Rprofile")) {
source("~/.Rprofile")
}