Learn R Programming

pipeflow (version 0.2.2)

pipe_set_params_at_step: Set parameters at step

Description

Set unbound function parameters defined at given pipeline step where 'unbound' means parameters that are not linked to other steps. If one or more parameters don't exist, an error is given.

Usage

pipe_set_params_at_step(pip, step, params)

Value

returns the Pipeline object invisibly

Arguments

pip

Pipeline object

step

string the name of the step

params

list of parameters to be set

Examples

Run this code
p <- pipe_new("pipe", data = 1)
pipe_add(p, "add1", \(x = ~data, y = 2, z = 3) x + y)
pipe_set_params_at_step(p, step = "add1", params = list(y = 5, z = 6))
pipe_get_params(p)

try(
  pipe_set_params_at_step(p, step = "add1", params = list(foo = 3))
)

Run the code above in your browser using DataLab