-
Notifications
You must be signed in to change notification settings - Fork 0
/
_targets.R
47 lines (42 loc) · 1.06 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("renv","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 = pkgs,
command = get_pharmaverse_pkgs()
),
tar_target(
name = cran,
command = get_cran(pkgs$name)
),
tar_target(
name = github,
command = get_github(pkgs$repo)
),
tar_target(
name = badge_data,
command = create_badge_data(
pharmaverse_pkgs = pkgs,
cran_data = cran,
github_data = github
)
),
tar_target(
name = saved_data,
command = write_data(badge_data)
)
)