recipes (version 1.0.10)

formula.recipe: Create a formula from a prepared recipe

Description

In case a model formula is required, the formula method can be used on a recipe to show what predictors and outcome(s) could be used.

Usage

# S3 method for recipe
formula(x, ...)

Value

A formula.

Arguments

x

A recipe object that has been prepared.

...

Note currently used.

Examples

Run this code

formula(recipe(Species + Sepal.Length ~ ., data = iris) %>% prep())

iris_rec <- recipe(Species ~ ., data = iris) %>%
  step_center(all_numeric()) %>%
  prep()
formula(iris_rec)

Run the code above in your browser using DataLab