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

Target types can be one of any provided by the targets or tarchetypes packages.

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 Feb. 26, 2023, 3:34 a.m.