-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_targets.R
42 lines (36 loc) · 1.24 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
# 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 # nolint
# Load packages required to define the pipeline:
library(targets)
# library(tarchetypes) # Load other packages as needed. # nolint
# Set target options:
tar_option_set(
packages = c("tidyverse", "sp", "sf"), # packages that your targets need to run
format = "rds" # default storage format
# Set other options as needed.
)
# tar_make_clustermq() configuration (okay to leave alone):
options(clustermq.scheduler = "multiprocess")
# tar_make_future() configuration (okay to leave alone):
future::plan(future.callr::callr)
# Run the R scripts in the R/ folder with your custom functions:
tar_source()
# source("other_functions.R") # Source other scripts as needed. # nolint
# Replace the target list below with your own:
list(
tar_target(
files,
get_files(data_dir = "U:\\Research\\Projects\\health\\jti_research_data\\jti_itraqi"),
format = "file"
),
tar_target(
name = data,
command = load_data(data_files = files)
),
tar_target(
name = data,
command = select_cohort(data_files = files)
)
)