pipeline_action: Create action object

View source: R/project-pipeline.R

pipeline_actionR Documentation

Create action object

Description

Create action object

Usage

pipeline_action(
  name,
  run,
  arguments = NULL,
  needs = NULL,
  highly_sensitive = NULL,
  moderately_sensitive = NULL,
  ...
)

Arguments

name

The name of the action. Must be a 1-d character

run

The run command. Must be a 1-d character

arguments

A character vector of arguments to be appended to the run command. Note that all arguments are parsed as strings / characters, so should be converted in-script if needed

needs

A character vector of names of action dependencies

highly_sensitive

A named character vector (or named list) of highly sensitive outputs from the action

moderately_sensitive

A named character vector (or named list) of moderately sensitive outputs from the action

...

other possible key:value pairs for action types with special parameters

Details

A named list of length one containing all information needed to define the action and turn it into a yaml chunk. This function can be used a a one-off to create single actions, or used to generate functions that create more specific actions with repeated patterns. All action objects created by this function should be then put together using the pipeline_list() function, for instance pipeline_list(action(...), action(...), action(...), ...). If combining 2 or more actions before passing to pipeline_list(), use the helper function c_action() (similar to purrr::splice(...) or purrr::list_flatten(list(...))). This ensures that the list of actions has the correct structure. Do not use list(...) or similar!

Value

list


wjchulme/osutils documentation built on Dec. 20, 2024, 9:56 a.m.