Learn R Programming

pipeflow (version 0.2.2)

pipe_rename_step: Rename step

Description

Safely rename a step in the pipeline. If new step name would result in a name clash, an error is given.

Usage

pipe_rename_step(pip, from, to)

Value

the Pipeline object invisibly

Arguments

pip

Pipeline object

from

string the name of the step to be renamed.

to

string the new name of the step.

Examples

Run this code
p <- pipe_new("pipe", data = 1:2)
pipe_add(p, "add1", \(data = ~data, x = 1) x + data)
pipe_add(p, "add2", \(x = 1, y = ~add1) x + y)
p

try(pipe_rename_step(p, from = "add1", to = "add2"))

pipe_rename_step(p, from = "add1", to = "first_add")
p

Run the code above in your browser using DataLab