This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rprofile
44 lines (40 loc) · 1.83 KB
/
.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
44
source("renv/activate.R")
# For Linux and Windows users, we'll use RStudio Package Manager (RSPM).
if (Sys.info()[["sysname"]] %in% c("Linux")) {
options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/jammy/latest"))
} else {
# For Mac users, we'll default to installing from CRAN/MRAN instead, since
# RSPM does not yet support Mac binaries.
options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/latest"))
# options(renv.config.mran.enabled = TRUE) # TRUE by default
}
options(
renv.config.repos.override = getOption("repos"),
renv.config.auto.snapshot = TRUE, # Attempt to keep renv.lock updated automatically
renv.config.rspm.enabled = TRUE, # Use RStudio Package manager for pre-built package binaries
renv.config.install.shortcuts = TRUE, # Use the existing local library to fetch copies of packages for renv
renv.config.cache.enabled = TRUE, # Use the renv build cache to speed up install times
renv.config.cache.symlinks = TRUE, # Keep full copies of packages locally than symlinks to make the project portable in/out of containers
renv.config.install.transactional = FALSE,
renv.config.synchronized.check = FALSE
)
# vscode-R options
if (interactive() && Sys.getenv("RSTUDIO") == "") {
Sys.setenv(TERM_PROGRAM = "vscode")
if ("httpgd" %in% .packages(all.available = TRUE)) {
options(vsc.plot = FALSE)
options(device = function(...) {
httpgd::hgd(silent = TRUE)
.vsc.browser(httpgd::hgd_url(history = FALSE), viewer = FALSE)
})
}
}
options(vsc.viewer = FALSE)
# Use an external browser for displaying html files, such as {gt} and {xaringan}
options(vsc.viewer = FALSE)
# External browser for web apps, such as {shiny}
options(vsc.browser = FALSE)
# View help page in an external browser
options(vsc.helpPanel = FALSE)
# Use original data viewer
options(vsc.view = FALSE)