Autowire: Autowire Directed Unpack Connections

Description Usage Arguments Value

View source: R/utils_connections.R

Description

Creates directed unpack connections automatically between headModules and tailModules. For this to work, the associated function object of a head module must have a single extractable return statement that returns a named list. When this returned named list has a name collision with an input argument name of a tail module, a DirectedUnpackConnection is created between the head module and the tail Module. An error is thrown by this function when the associated function obj of a head module is not set up for autowiring. This specifically happens when the associated function obj has 0 or multiple extractable return statements in the body of the associated function object, or the return statement does not return a named list. Note, the absence of an error message does not imply connections were created – just that the headModules return statements are compatible with this autowiring function.

Usage

1
2
Autowire(headModules, tailModules, connectionNamePrefix = NULL,
  exclusions = c(""))

Arguments

headModules

a module object, list of module objects, or character vector of names of modules. If multiple module objects are provided and several of them output variables with the same name Output of earlier modules in the list will be ignored when constructing a connection.

tailModules

a module object, list of module objects, or character vector of names of modules

connectionNamePrefix

a character string to use as a prefix in the name generation of connections created with this function. Default is NULL, in which case The head and tail module names are concatenated to be used as the prefix.

exclusions

a character vector of named outputs from headModules to exclude from autowiring.

Value

list of created connections


UptakeOpenSource/updraft documentation built on Oct. 17, 2019, 3:31 p.m.