target: Create a workflow target definition

targetR Documentation

Create a workflow target definition

Description

Create a workflow target definition.

Usage

target(
  name,
  command,
  type = "tar_target",
  args = list(),
  comment = character()
)

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".

Value

An S4 object of class Target.

Examples

workflow_target <- target('a_target',
                          1 + 1,
                          args = list(memory = 'persistent'), 
                          comment = 'A target')

workflow_target

jasenfinch/metaboWorkflows documentation built on May 24, 2023, 8:23 a.m.