-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_targets.R
47 lines (42 loc) · 1.25 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
# https://books.ropensci.org/targets/walkthrough.html#inspect-the-pipeline
# To test
#
# targets::tar_manifest(fields = all_of("command"))
# targets::tar_visnetwork()
# Load packages required to define the pipeline:
library(targets)
# library(tarchetypes) # Load other packages as needed.
# Set target options:
tar_option_set(
packages = c("tibble","qs"), # Packages that your targets need for their tasks.
format = "qs", # Optionally set the default storage format. qs is fast.
)
# Run the R scripts in the R/ folder with your custom functions:
tar_source()
# Replace the target list below with your own:
list(
tar_target(
name = get_gsheet_data,
command = get_data()
),
tar_target(
name = data_processed_team,
command = build_team(get_gsheet_data[["team"]])
),
tar_target(
name = data_processed_proceedings,
command = build_proceedings(get_gsheet_data[["all_conferences"]])
),
tar_target(
name = data_processed_workshops,
command = build_workshops(get_gsheet_data[["workshops"]])
),
tar_target(
name = write_data_to_files,
command = write_data(
processed_team = data_processed_team,
processed_proceedings = data_processed_proceedings,
processed_workshops = data_processed_workshops
)
)
)