-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rprofile
21 lines (19 loc) · 908 Bytes
/
.Rprofile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# When starting a new R session, a specific directory is added to the libPath.
# It's called libWin resp. libLinux. As it is on the first libPath position,
# packages are installed into this directory by default. This enables working in
# a sandbox.
.First <- function() {
# Check operating system
if (Sys.info()["sysname"] == "Windows") {
# Add libWin with the full path to libPaths
.libPaths(new = c(paste(getwd(), "libWin", sep = "/"), .libPaths()))
} else if (Sys.info()["sysname"] == "Linux") {
.libPaths(new = c(paste(getwd(), "libLinux", sep = "/"), .libPaths()))
} else if (Sys.info()["sysname"] == "Darwin") {
.libPaths(new = c(paste(getwd(), "libMac", sep = "/"), .libPaths()))
}
options(repos = c(getOption("repos"),
PANDORA = "https://Pandora-IsoMemo.github.io/drat/",
INWTLab = "https://inwtlab.github.io/drat/"))
}
.First()