Autowire.Rd
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.
Autowire(headModules, tailModules, connectionNamePrefix = NULL, exclusions = c(""))
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 |
exclusions | a character vector of named outputs from
|
list of created connections