| pip_clone | R Documentation |
Creates an independent copy of the pipeline. Changes to the cloned pipeline do not affect the original pipeline, and vice versa.
pip_clone(x, name = NULL)
x |
A pipeflow pipeline object. |
name |
Optional name for the cloned pipeline. If |
A cloned pipeflow pipeline object.
p <- pip_new("original") |>
pip_add("s1", \(x = 1) x) |>
pip_add("s2", \(x = ~s1) x + 1)
# Clone produces a fully independent copy
cp <- pip_clone(p, name = "copy")
pip_add(cp, "s3", \(x = ~s2) x * 10)
# As a result, the clone has the new step ...
cp
# ... while the original is left unchanged
p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.