-
Notifications
You must be signed in to change notification settings - Fork 12
/
.Rprofile
executable file
·52 lines (42 loc) · 1.35 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
45
46
47
48
49
50
51
Sys.setenv(TERM_PROGRAM = "vscode")
if (Sys.getenv("CI") == "") {
source(file.path(Sys.getenv(if (.Platform$OS.type == "windows") "USERPROFILE" else "HOME"), ".vscode-R", "init.R"))
}
if ("httpgd" %in% .packages(all.available = TRUE)) {
options(vsc.plot = FALSE)
options(device = function(...) {
httpgd::hgd(silent = TRUE)
.vsc.browser(httpgd::hgd_url(), viewer = "Beside")
})
}
source("renv/activate.R")
options(bitmapType = "cairo")
options(
drake_make_menu = FALSE,
Ncpus = 10,
# repos = BiocManager::repositories(),
radian.editing_mode = "vi",
radian.auto_match = TRUE,
radian.auto_indentation = TRUE,
radian.tab_size = 2,
radian.complete_while_typing = TRUE,
scipen = 999,
clustermq.template = "slurm_clustermq.tmpl",
precommit.executable = "/home/patrick/.local/bin/pre-commit",
renv.settings.auto.snapshot = TRUE
)
suppressMessages(require(drake))
suppressMessages(require(magrittr))
suppressMessages(require(usethis))
# tibble > data.frame
if (interactive() && "tibble" %in% rownames(utils::installed.packages())) {
print.data.frame <- function(x, ...) {
tibble:::print.tbl(tibble::as_tibble(x), ...)
}
}
# runAllChunks <- function(rmd, envir = globalenv()) {
# tempR <- tempfile(tmpdir = ".", fileext = ".R")
# on.exit(unlink(tempR))
# knitr::purl(rmd, output = tempR)
# sys.source(tempR, envir = envir)
# }