-
Notifications
You must be signed in to change notification settings - Fork 0
/
_targets.R
49 lines (37 loc) · 1.49 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
37
38
39
40
41
42
43
44
45
46
47
48
49
library(targets)
library(tarchetypes)
library(ourproj)
# create dependency on development packages (see
# https://books.ropensci.org/targets/packages.html#package-based-invalidation)
tar_option_set(packages = c("ourproj"),
imports = c("ourproj"))
# load global objects - constants (file paths)
source("_targets_config.R")
# End this file with a list of target objects.
list(
# Files ----------------------------------------------------------
## Config files ------------------------------------------------
tar_target(TARGETS_CONFIG,
"_targets_config.R",
format = "file"),
## Raw data ----------------------------------------------------------
tar_track_input_files(),
tar_target(
pcd_refset,
list(
PCD_REFSET_CONTENT = PCD_REFSET_CONTENT,
PCD_REFSET_CONTENT_BY_OUTPUT = PCD_REFSET_CONTENT_BY_OUTPUT,
PCD_RULSET_FULL_NAME_MAPPINGS = PCD_RULSET_FULL_NAME_MAPPINGS,
PCD_SERVICE_FULL_NAME_MAPPINGS = PCD_SERVICE_FULL_NAME_MAPPINGS,
PCD_SERVICE_OUTPUT_DESCRIPTIONS = PCD_SERVICE_OUTPUT_DESCRIPTIONS
) |>
purrr::map(readr::read_tsv,
col_types = readr::cols(.default = "c")),
),
# Quarto -------------------------------------------------------
# target factory to render all workflowr Rmd files in analysis directory
tar_quarto(QUARTO_WEBSITE),
# README ------------------------------------------------------------------
tar_render(name = README_RMD,
path = "README.Rmd")
)