forked from inrae/diades.atlas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rprofile
29 lines (23 loc) · 780 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("~/.Rprofile")) {
source("~/.Rprofile")
}
if (Sys.info()["user"] != "rstudio-connect") {
if (Sys.getenv("RENV_PATHS_LIBRARY_ROOT") != "") {
Sys.setenv(RENV_PATHS_LIBRARY_ROOT = "/home/rstudio/.renv/library")
}
source("renv/activate.R")
lock_ <- renv:::lockfile(file = "renv.lock")
# # Fix CRAN version
if (Sys.info()["sysname"] == "Linux") {
cat("[renv] Setting repo to RSPM ----")
lock_$repos(CRAN = "https://packagemanager.rstudio.com/all/__linux__/focal/latest")
} else {
cat("[renv] Setting repo to cran.rstudio.com ----")
lock_$repos(CRAN = "https://cran.rstudio.com")
}
lock_$write(file = "renv.lock")
rm(lock_)
renv::settings$use.cache(TRUE)
renv::activate()
}
# file.copy(".Rprofile", to = "~/.Rprofile")