## Introduction

With recipes, you can use dplyr-like pipeable sequences of feature engineering steps to get your data ready for modeling. For example, to create a recipe containing an outcome plus two numeric predictors and then center and scale (“normalize”) the predictors:

library(recipes)

step_normalize(all_numeric_predictors())

#> Recipe
#>
#> Inputs:
#>
#>       role #variables
#>    outcome          1
#>  predictor          2
#>
#> Operations:
#>
#> Centering and scaling for all_numeric_predictors()

More information on recipes can be found at the Get Started page of tidymodels.org.

You may consider recipes as an alternative method for creating and preprocessing design matrices (also known as model matrices) that can be used for modeling or visualization. While R already has long-standing methods for creating such matrices (e.g. formulas and model.matrix), there are some limitations to what the existing infrastructure can do.

## Installation

There are several ways to install recipes:

# The easiest way to get recipes is to install all of tidymodels:
install.packages("tidymodels")

# Alternatively, install just recipes:
install.packages("recipes")

# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github("tidymodels/recipes")