-
Notifications
You must be signed in to change notification settings - Fork 2
/
_targets.R
29 lines (26 loc) · 1.01 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
library(targets)
library(tarchetypes)
# This is an example _targets.R file. Every
# {targets} pipeline needs one.
# Use tar_script() to create _targets.R and tar_edit()
# to open it again for editing.
# Then, run tar_make() to run the pipeline
# and tar_read(summary) to view the results.
# Define custom functions and other global objects.
# This is where you write source(\"R/functions.R\")
# if you keep your functions in external scripts.
source("R/functions_data.R")
source("R/functions_analysis.R")
source("R/functions_tables.R")
source("R/utils.R")
# Set target-specific options such as packages.
tar_option_set(
packages = c("data.table", "fst", "kableExtra", "ggplot2", "ggthemes"))
# End this file with a list of target objects.
list(
tar_target(hello_vec, hello_dt_fun()),
tar_target(hello_dt, hello_an_fun(hello_vec), format = "fst_dt"),
tar_target(hello_tex, hello_tbl(hello_dt), format = "file"),
# You can also render small RMarkdown with tarchetypes::tar_render()
tar_render(report, "report.Rmd")
)