addPipe: Add a pipe to a pipeline

Description Usage Arguments Value See Also Examples

Description

This functions adds a new pipe to a pipeline.

Usage

1
addPipe(newPipe, pipeline)

Arguments

newPipe

pipe object

pipeline

pipeline object

Value

pipeline object

See Also

pipe, pipeline

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
26
27
## create a pipeline with two modules
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\""))))
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)"))))
pline1 <- pipeline(name = "trivialpipeline", components = list(mod1, mod2))
## create a pipe
pipe1 <- pipe("setX", "x",
              "showY", "y")
## add pipe to pipeline
pline1 <- addPipe(pipe1, pline1)

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