-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_targets.R
36 lines (28 loc) Β· 1.04 KB
/
_targets.R
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
options(tidyverse.quiet = TRUE,
dplyr.summarise.inform = FALSE)
library(targets)
library(tarchetypes)
library(tidyverse)
tar_option_set(
packages = c("tibble"),
format = "rds"
)
# here::here() returns an absolute path, which then gets stored in tar_meta and
# becomes computer-specific (i.e. /Users/andrew/Research/blah/thing.Rmd).
# There's no way to get a relative path directly out of here::here(), but
# fs::path_rel() works fine with it (see
# https://github.com/r-lib/here/issues/36#issuecomment-530894167)
here_rel <- function(...) {fs::path_rel(here::here(...))}
# Load functions for the pipeline
source("R/triptych.R")
# THE MAIN PIPELINE ----
list(
## Create the three panel Bayesian plot ----
tar_target(bayesian_triptych, build_triptych_panels()),
## Build the README ----
tar_target(workflow_graph, tar_mermaid(targets_only = TRUE, outdated = FALSE,
legend = FALSE, color = FALSE)),
tar_quarto(readme, here_rel("README.qmd")),
## Build site ----
tar_quarto(site, path = ".")
)