-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rprofile
28 lines (21 loc) · 843 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
## Set CRAN Mirror:
local({
r <- getOption("repos")
## r["CRAN"] <- "https://cloud.r-project.org/"
r["CRAN"] <- "https://vps.fmvz.usp.br/CRAN/"
options(repos = r)
})
## Create hidden environment
.env <- new.env()
## Define new q() function
.env$q <- function(save = "no", ...) {
quit(save = save, ...)
}
## Attach hidden environment
attach(.env, warn.conflicts = FALSE)
local({
n <- parallel::detectCores() # Detect number of CPU cores
options(Ncpus = n) # Parallel package installation in install.packages()
options(mc.cores = n) # Parallel apply-type functions via 'parallel' package
})
options(digits = 15) # Number of digits to print. Default is 7, max is 15