-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_targets.R
More file actions
executable file
·30 lines (26 loc) · 1.16 KB
/
_targets.R
File metadata and controls
executable file
·30 lines (26 loc) · 1.16 KB
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
# Created by use_targets().
# Follow the comments below to fill in this target script.
# Then follow the manual to check and run the pipeline:
# https://books.ropensci.org/targets/walkthrough.html#inspect-the-pipeline
# Load packages required to define the pipeline:
library(targets)
# Set target options:
tar_option_set(
packages = c(
"tidyverse", "ggplot2", "here", "dtw", "dendextend", "patchwork", "zoo", "kableExtra",
"gt", "gtExtras", "clock", "lubridate", "scales", "caret", "yardstick", "ggpubr",
"gtsummary")
)
# Run the R scripts in the R/ folder with your custom functions:
tar_source("src/")
# Replace the target list below with your own:
list(
tar_target(catalogue, create_catalogue("data/raw")),
tar_target(data, prepare_data(load_from_catalogue(catalogue))),
tar_target(mean_curves, create_mean_curves(data)),
tar_target(dendogram, hierarchical_clustering(mean_curves)),
tar_target(mot_curve, visualise_mean_curve(mean_curves, "MOT")),
tar_target(classes, label_data(mean_curves)),
tar_target(final_data, left_join(data, classes, by = join_by(keyword == keyword))),
tar_target(keywords, list_keywords(final_data))
)