Create a workflow target definition.
Arguments
- name
the target name
- command
the R command to run the target
- type
the target archetype
- args
a list of arguments to pass the the specified target archetype
- comment
optional comment that precedes the target code
Details
The specified target type can be one of any provided by the targets package such as tar_target.
For target archetypes outside of targets, declare the package directly for argument
type. For instance, type = "tarchetypes::tar_file".
Examples
workflow_target <- target('a_target',
1 + 1,
args = list(memory = 'persistent'),
comment = 'A target')
workflow_target
#> ## A target
#> tar_target(
#> a_target,
#> 1 + 1,
#> memory = "persistent"
#> )