Learn R Programming

pipeflow (version 0.2.2)

pipe_set_data: Set data

Description

Set data in first step of pipeline.

Usage

pipe_set_data(pip, data)

Value

returns the Pipeline object invisibly

Arguments

pip

Pipeline object

data

initial data set.

Examples

Run this code
p <- pipe_new("pipe", data = 1)
pipe_add(p, "add1", \(x = ~data, y = 1) x + y, keepOut = TRUE)
p |> pipe_run() |> pipe_collect_out()

pipe_set_data(p, 3)
p |> pipe_run() |> pipe_collect_out()

Run the code above in your browser using DataLab