-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_targets.R
More file actions
30 lines (21 loc) · 758 Bytes
/
_targets.R
File metadata and controls
30 lines (21 loc) · 758 Bytes
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
## For more information about targets see https://books.ropensci.org/targets
## Load your packages, e.g. library(targets).
source("./packages.R")
# load environment variables
dotenv::load_dot_env()
# Set target options with targets::tar_option_set() - useful for tuning performance and setting up pipelines on HPCs
## Load functions stored in /R
targets::tar_source()
## logical collection of targets that does some task
example_tar_plan <- tar_plan(
# tar_target(targets_are_nouns, functions_are_verbs(arg))
)
example_tar_plan2 <- tar_plan(
tar_target(data, get_data(arg)),
tar_target(data_cleaned, clean_data(data))
)
# add tar_plan outputs to this list to have targets make them.
list(
example_tar_plan,
example_tar_plan2
)