-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rprofile
37 lines (31 loc) · 872 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
source("renv/activate.R")
if (file.exists("~/.Rprofile")) source("~/.Rprofile")
if(!requireNamespace("pacman", quietly = TRUE)) {
utils::install.packages("pacman")
}
pacman::p_load(
magrittr,
dplyr,
tidyr,
ggplot2,
duckdb,
arrow,
DBI,
odbc,
targets,
tarchetypes
)
library(conflicted)
conflicted::conflict_prefer("filter", "dplyr", quiet = TRUE)
conflicted::conflict_prefer("select", "dplyr", quiet = TRUE)
conflicted::conflict_prefer("expand", "tidyr", quiet = TRUE)
# make all fns available to {targets} (and interactively, via load_all)
if (rlang::is_interactive()) {
devtools::load_all()
# delayedAssign("duckdb_con", connect_duckdb(), assign.env = globalenv())
# delayedAssign("pg_con", connect_pg(), assign.env = globalenv())
} else {
invisible(
lapply(list.files("./R", full.names = TRUE), source, encoding = "UTF-8")
)
}