detect_step: Detect if a particular step or check is used in a recipe

View source: R/misc.R

detect_stepR Documentation

Detect if a particular step or check is used in a recipe

Description

Detect if a particular step or check is used in a recipe

Usage

detect_step(recipe, name)

Arguments

recipe

A recipe to check.

name

Character name of a step or check, omitted the prefix. That is, to check if step_intercept is present, use name = intercept.

Value

Logical indicating if recipes contains given step.

See Also

developer_functions

Examples

rec <- recipe(Species ~ ., data = iris) %>%
  step_intercept()

detect_step(rec, "intercept")

recipes documentation built on July 4, 2024, 9:06 a.m.