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

Description Usage Arguments Value Examples

View source: R/misc.R

Description

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

Usage

1

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.

Examples

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

detect_step(rec, "step_intercept")

recipes documentation built on July 2, 2020, 4:02 a.m.