Detect if a particular step or check is used in a recipe
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, usename = intercept
.
Examples
rec <- recipe(Species ~ ., data = iris) %>%
step_intercept()
detect_step(rec, "intercept")
#> [1] TRUE