-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_targets.R
74 lines (71 loc) · 2 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
library(targets)
tar_option_set(
packages = c("dplyr", "ggplot2", "glue", "here", "patchwork", "tibble", "wallis")
)
tar_source()
list(
tar_target(
name = R6_g1,
command = greedy1(6) |> mutate(fill = visit)
),
tar_target(
name = R8_g1,
command = greedy1(8) |> mutate(fill = visit)
),
tar_target(
name = R12_g1,
command = greedy1(12) |> mutate(fill = visit)
),
tar_target(
name = R8_g2,
command = greedy2(8) |> mutate(fill = visit)
),
tar_target(
name = R10_g2,
command = greedy2(10) |> mutate(fill = visit)
),
tar_target(
name = R12_g2,
command = greedy2(12) |> mutate(fill = visit)
),
tar_target(
name = plot_R6_g1,
command = plot_with_labs(R6_g1)
),
tar_target(
name = plot_R6_g1_R8_g1,
command = plot_with_labs(R6_g1) + plot_with_labs(R8_g1)
),
tar_target(
name = plot_R12_g1,
command = plot_with_labs(R12_g1)
),
tar_target(
name = plot_R8_g2_R10_g2,
command = plot_with_labs(R8_g2) + plot_with_labs(R10_g2)
),
tar_target(
name = plot_R12_g2,
command = plot_with_labs(R12_g2)
),
tar_target(
name = save_plot_R6_g1,
command = ggsave(plot = plot_R6_g1, filename = here("plots", "greedy1-example-plot.png"), width = 3, height = 3, bg = "white")
),
tar_target(
name = save_plot_R6_g1_R8_g1,
command = ggsave(plot = plot_R6_g1_R8_g1, filename = here("plots", "greedy1-examples1-plot.png"), width = 8, height = 3, bg = "white")
),
tar_target(
name = save_plot_R12_g1,
command = ggsave(plot = plot_R12_g1, filename = here("plots", "greedy1-examples2-plot.png"), width = 5, height = 5, bg = "white")
),
tar_target(
name = save_plot_R8_g2_R10_g2,
command = ggsave(plot = plot_R8_g2_R10_g2, filename = here("plots", "greedy2-examples1-plot.png"), width = 9, height = 4, bg = "white")
),
tar_target(
name = save_plot_R12_g2,
command = ggsave(plot = plot_R12_g2, filename = here("plots", "greedy2-examples2-plot.png"), width = 5, height = 5, bg = "white")
)
)