pipe_remove_step {pipeflow} | R Documentation |
Remove certain step from the pipeline.
Description
Can be used to remove any given step.
If other steps depend on the step to be removed, an error is
given and the removal is blocked, unless recursive
was set to TRUE
.
Usage
pipe_remove_step(pip, step, recursive = FALSE)
Arguments
pip |
|
step |
|
recursive |
|
Value
the Pipeline
object invisibly
Examples
p <- pipe_new("pipe", data = 1:2)
pipe_add(p, "add1", \(data = ~data, x = 1) x + data)
pipe_add(p, "add2", \(x = 1, y = ~add1) x + y)
pipe_add(p, "mult1", \(x = 1, y = ~add2) x * y)
p
pipe_remove_step(p, "mult1")
p
try(pipe_remove_step(p, "add1"))
pipe_remove_step(p, "add1", recursive = TRUE)
p
[Package pipeflow version 0.2.2 Index]