addComponent: Add a new component to a pipeline

Description Usage Arguments Value See Also Examples

Description

This function adds a new module or pipeline to a pipeline's components.

Usage

1
addComponent(newComponent, pipeline)

Arguments

newComponent

pipeline or module object to be added

pipeline

pipeline to be amended

Value

pipeline object

See Also

pipeline, module

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## create a pipeline with one module
mod1 <- module(name = "setX", language = moduleLanguage("R"),
               description = "sets the value of x",
               outputs = list(
                   moduleOutput(
                       name = "x",
                       vessel = internalVessel("x"),
                       format = ioFormat("R character string"))),
               sources = list(
                   moduleSource(
                       vessel = scriptVessel("x <- \"set\""))))
pline1 <- pipeline(name = "trivialpipeline", components = list(mod1))
## create a new module
mod2 <- module("showY", language = moduleLanguage("R"),
               description = "displays the value of Y",
               inputs = list(
                   moduleInput(
                       name = "y",
                       vessel = internalVessel("y"),
                       format = ioFormat("R character string"))),
               sources = list(
                   moduleSource(
                       vessel = scriptVessel("print(y)"))))
## add new module to pipeline
pline1 <- addComponent(mod2, pline1)

anhinton/conduit documentation built on May 10, 2019, 11:48 a.m.