| pip_reset | R Documentation |
Resets all unlocked steps of a pipeline (or a subset of steps defined by a
view) to state "new" and clears their outputs, so a subsequent
pip_run() re-executes the cleaned steps from scratch.
Any pending restart counters are cleared, but parameters, tags, and
locked flags are left unchanged.
pip_reset(x)
x |
A pipeflow pip or view. If a view is given, only the steps covered by the view are reset. |
Locked steps are skipped: their state and output are preserved. If all selected steps are locked, a warning is issued and nothing is changed.
The updated pipeline or view, invisibly.
p <- pip_new() |>
pip_add("load", \(n = 3) seq_len(n)) |>
pip_add("square", \(x = ~load) x^2)
pip_run(p)
p[["state"]] # "done", "done"
# Locked steps keep their state and output when resetting
pip_lock(pip_view(p, step = "square"))
pip_reset(p)
p
p[["state"]] # "new", "done"
p[["out"]] # NULL, (x^2 result)
pip_unlock(p)
pip_reset(p)
p
p[["state"]] # "new", "new"
p[["out"]] # NULL, NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.