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

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 class 'recipe'
formula(x, ...)

Arguments

x

A recipe object that has been prepared.

...

Note currently used.

Value

A formula.

Examples

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

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

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.