Add a computational pipeline to a worcs
project using the
targets
and tarchetypes
packages (which must be installed). See those
packages for extensive documentation.
Arguments
- worcs_directory
Character, indicating the WORCS project directory to which to save data. The default value "." points to the current directory. Default: '.'
- verbose
Logical. Whether or not to print status messages to the console. Default:
TRUE
- ...
Arguments passed to
targets::use_targets()
.
Examples
# Create directory to run the example
old_wd <- getwd()
test_dir <- file.path(tempdir(), "targets")
dir.create(test_dir)
setwd(test_dir)
file.create(".worcs")
#> [1] TRUE
add_targets()
#> ✖ Install packages {{future}}, {{future.callr}}, and {{future.batchtools}} to allow use_targets() to configure tar_make_future() options.
#> • Writing file "_targets.R".
#> • Writing file "run.R".
#> • Writing file "run.sh".
#> ✔ Added targets to project.
#> ✔ Setting entry point to 'run.r'.
#> ✔ Setting recipe to source('run.r').
#> ✔ Creating directory './R/' for targets scripts.
# Cleaning example directory
setwd(old_wd)
unlink(test_dir, recursive = TRUE)