-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rprofile
23 lines (20 loc) · 907 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
# source("renv/activate.R")
.dh <- new.env()
.dh$proj_root <- normalizePath(getwd())
# we need to force this so it gets stored/saved immediately
# otherwise the first time you execute it lazily references and you get the error
# Error: promise already under evaluation: recursive default argument reference or earlier problems?
.dh$slurm_job_template_path <- force(file.path(.dh$proj_root, "model", "nonmem", "slurm-job.tmpl"))
.dh$bbi_config_path <- file.path(.dh$proj_root, "model", "nonmem", "bbi.yaml")
.dh$submission_root <- file.path(.dh$proj_root, "model", "nonmem", "submission-log")
.dh$document <- function() {
devtools::document(file.path(.dh$proj_root, "pkgs", "internal"))
}
.dh$load_internal <- function(document = TRUE) {
if (document) {
.dh$document()
# document will load anyway
return(invisible())
}
pkgload::load_all(file.path(.dh$proj_root, "pkgs", "internal"))
}