pipe_replace_step | R Documentation |
Replaces an existing pipeline step.
pipe_replace_step(
pip,
step,
fun,
params = list(),
description = "",
group = step,
keepOut = FALSE
)
pip |
|
step |
|
fun |
|
params |
|
description |
|
group |
|
keepOut |
|
returns the Pipeline
object invisibly
pipe_add()
p <- pipe_new("pipe", data = 1)
pipe_add(p, "add1", \(x = ~data, y = 1) x + y)
pipe_add(p, "add2", \(x = ~data, y = 2) x + y)
pipe_add(p, "mult", \(x = 1, y = 2) x * y, keepOut = TRUE)
pipe_run(p) |> pipe_collect_out()
pipe_replace_step(p, "mult", \(x = ~add1, y = ~add2) x * y, keepOut = TRUE)
pipe_run(p) |> pipe_collect_out()
try(pipe_replace_step(p, "foo", \(x = 1) x)) # step 'foo' does not exist
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.