pipe_insert_after {pipeflow} | R Documentation |
Insert step
Description
Insert step
Usage
pipe_insert_after(pip, afterStep, step, ...)
pipe_insert_before(pip, beforeStep, step, ...)
Arguments
pip |
|
afterStep |
|
step |
|
... |
further arguments passed to |
beforeStep |
|
Value
returns the Pipeline
object invisibly
Methods
-
pipe_insert_after
: insert step after a certain step of the pipeline -
pipe_insert_before
: insert step before a certain step of the pipeline
Examples
# pipe_insert_after
p <- pipe_new("pipe", data = 1)
pipe_add(p, "f1", \(x = 1) x)
pipe_add(p, "f2", \(x = ~f1) x)
pipe_insert_after(p, "f1", step = "after_f1", \(x = ~f1) x)
p
# insert_before
pipe_insert_before(p, "f2", step = "before_f2", \(x = ~f1) 2 * x)
p
[Package pipeflow version 0.2.2 Index]