Skip to contents

Creates a copy of a pipeline object.

Usage

pipe_clone(pip, deep = FALSE)

Arguments

pip

Pipeline object

deep

logical whether to perform a deep copy

Value

returns the copied Pipeline object

Examples

p1 <- pipe_new("pipe")
pipe_add(p1, "step1", \(x = 1) x)
p2 <- pipe_clone(p1)
pipe_add(p2, "step2", \(y = 1) y)
p1
#>      step depends    out keepOut  group  state
#>    <char>  <list> <list>  <lgcl> <char> <char>
#> 1:   data         [NULL]   FALSE   data    New
#> 2:  step1         [NULL]   FALSE  step1    New
p2
#>      step depends    out keepOut  group  state
#>    <char>  <list> <list>  <lgcl> <char> <char>
#> 1:   data         [NULL]   FALSE   data    New
#> 2:  step1         [NULL]   FALSE  step1    New
#> 3:  step2         [NULL]   FALSE  step2    New