-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rprofile
43 lines (33 loc) · 988 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
## Where am I?
.First <- function() {
# Print a welcome message
message("Your working directory is currently: ", getwd())
}
## Set default mirror
local({
r <- getOption("repos")
r["CRAN"] <- "https://cloud.r-project.org"
options(repos = r)
})
## Set multiple cores
options(Ncpus = parallel::detectCores() - 2)
options(mc.cores = parallel::detectCores() - 2)
## Needed for transperancy
## Requires:
## ```bash
## xbps-install -S libXt-devel
## ```
## ```r
## install.packages("cairo")
## ```
setHook(
packageEvent("grDevices", "onLoad"),
function(...) grDevices::X11.options(type = "cairo")
)
# options(device = "x11") # NOTE may need to remove this for Jupyter under Runit
## https://stackoverflow.com/a/22915279
options(bitmapType="cairo")
## Fix linting [^77286956]
options(lintr.linter_file="~/.config/R/lintr")
## Footnotes ...................................................................
## [^77286956]: https://stackoverflow.com/a/77286956