| pip_replace | R Documentation |
Replaces a step's function while keeping it in the same position in the
pipeline. Downstream steps are automatically marked as outdated and will
re-run on the next pip_run().
pip_replace(x, step, fun, tags = character(0))
x |
A pipeflow pipeline object. |
step |
Step name. |
fun |
Function to execute for the step. |
tags |
Optional character vector of tags belonging to the step.
Can also be adjusted later using |
The updated pipeline, invisibly.
p <- pip_new() |>
pip_add("load", \(n = 5) seq_len(n)) |>
pip_add("double", \(x = ~load) x * 2)
pip_run(p)
p
# Replace "load" — downstream steps are automatically marked "outdated"
pip_replace(p, "load", \(n = 3) seq_len(n))
p
# Re-run to bring everything up to date
pip_run(p)
p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.