-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rprofile
29 lines (24 loc) · 999 Bytes
/
.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
26
27
28
29
if (file.exists("renv/activate.R")) {
source("renv/activate.R")
cat("
--------------------------------------------------------------------------------
Welcome to the iAtlas Database Loader
--------------------------------------------------------------------------------
\n")
# Check to see if we're running in Gitlab
IS_CI <- Sys.getenv("CI", unset = "")
if (IS_CI != "1" && (length(find.package("devtools", quiet = T)) == 0 || length(find.package("renv", quiet = T)) == 0)) {
# prompt instead since RStudio won't show progress for slow .RProfile scripts...
cat("TODO: Install package requirements. This may take up to an hour the first time.\n")
cat("RUN: source('./install.R')\n")
} else {
# auto-run since it should be quick, but makes sure any new requirements are installed.
source('./install.R')
}
}
rm(IS_CI)
if (interactive()) {
suppressMessages(require(devtools))
suppressMessages(require(testthat))
suppressMessages(require(usethis))
}