pip_has_step: Check whether a step exists

View source: R/pipeline.R

pip_has_stepR Documentation

Check whether a step exists

Description

Check whether a step exists

Usage

pip_has_step(x, step)

Arguments

x

A pipeflow pip

step

A step name

Value

Logical indicating if the step exists

Examples

p <- pip_new() |>
  pip_add("load", \(x = 1) x) |>
  pip_add("fit", \(x = ~load) x + 1)

pip_has_step(p, "load") # TRUE
pip_has_step(p, "fit") # TRUE
pip_has_step(p, "predict") # FALSE — step not yet added

pipeflow documentation built on June 15, 2026, 9:10 a.m.