recipe_scale_center: Create a recipe to preprocess data

View source: R/recipe_scale_center.R

recipe_scale_centerR Documentation

Create a recipe to preprocess data

Description

Creates a recipe by scaling and centering the given data, and creates a model using the given formula.

Usage

recipe_scale_center(dataframe, formula)

Arguments

dataframe

A data frame or a tibble of the data.

formula

The formula used to create the model (eg: target ~ predictor).

Value

A tidymodel recipe, specifying inputs, outputs, and steps (scaling and centering) applied to all predictors.

Examples

recipe_scale_center(mtcars, mpg ~ hp)
recipe_scale_center(mtcars, mpg ~ hp + cyl)
recipe_scale_center(mtcars, mpg ~ .)

DSCI-310/DSCI-310-Group-11-package documentation built on April 9, 2022, 12:32 a.m.