Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

detect_step

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.

Examples

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

detect_step(rec, "step_intercept")

recipes

Preprocessing Tools to Create Design Matrices

v0.1.16
MIT + file LICENSE
Authors
Max Kuhn [aut, cre], Hadley Wickham [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.