| pip_rename | R Documentation |
Renames the selected step and updates dependency references in downstream steps.
pip_rename(x, from, to)
x |
A pipeflow pip |
from |
Existing step name |
to |
New step name |
The updated pipeline, invisibly.
p <- pip_new() |>
pip_add("s1", \(x = 1) x) |>
pip_add("s2", \(x = ~s1) x + 1) # "s2" depends on "s1"
# Downstream dependency references are updated automatically
pip_rename(p, from = "s1", to = "load_data")
p
#' # Trying to rename to an existing step name raises an error:
try(pip_rename(p, "load_data", to = "s2")) # step 's2' already exists!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.