generated from OxfordIHTM/ihtm-targets-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_targets.R
94 lines (75 loc) · 2.08 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
################################################################################
#
# General Targets Workflow
#
################################################################################
## Load libraries and custom functions -----------------------------------------
suppressPackageStartupMessages(source("packages.R"))
for (f in list.files(here::here("R"), full.names = TRUE)) source (f)
## Create targets and list targets objects -------------------------------------
### Data targets
data_targets <- tar_plan(
tar_target(
name = ox_equity_diversity_funding_dataset_url,
command = "https://researchsupport.admin.ox.ac.uk/sitefiles/combined-analysis-final.xlsx"
),
tar_target(
name = ox_equity_diversity_funding_dataset_file,
command = download_ox_equity_dataset(
url = ox_equity_diversity_funding_dataset_url,
path = "data-raw/combined-analysis-final.xlsx"
),
format = "file"
),
tar_target(
name = ox_equity_diversity_funding_dataset,
command = read_ox_equity_dataset(
path = ox_equity_diversity_funding_dataset_file,
type = "analysis"
)
),
tar_target(
name = ox_equity_diversity_funding_dataset_codes,
command = read_ox_equity_dataset(
path = ox_equity_diversity_funding_dataset_file,
type = "codes"
)
),
tar_target(
name = ox_equity_diversity_funding_dataset_fgd,
command = read_ox_equity_dataset(
path = ox_equity_diversity_funding_dataset_file,
type = "fgd"
)
)
)
### Processing targets
processing_targets <- tar_plan(
)
### Analysis targets
analysis_targets <- tar_plan(
)
### Output targets
output_targets <- tar_plan(
)
### Reporting targets
report_targets <- tar_plan(
tar_target(
name = test_report,
command = render_quarto_report(
input = "reports/test/test_report.qmd"
)
),
tar_target(
name = ferc_scoping_review_report,
command = render_quarto_report(
input = "reports/scoping-review/ferc_scoping_review.qmd"
),
format = "file"
)
)
### Deploy targets
deploy_targets <- tar_plan(
)
## List targets
all_targets()