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

juice

Extract Finalized Training Set


Description

As of recipes version 0.1.14, juice() is superseded in favor of bake(object, new_data = NULL).

Usage

juice(object, ..., composition = "tibble")

Arguments

object

A recipe object that has been prepared with the option retain = TRUE.

...

One or more selector functions to choose which variables will be returned by the function. See selections() for more details. If no selectors are given, the default is to use everything().

composition

Either "tibble", "matrix", "data.frame", or "dgCMatrix" for the format of the processed data set. Note that all computations during the baking process are done in a non-sparse format. Also, note that this argument should be called after any selectors and the selectors should only resolve to numeric columns (otherwise an error is thrown).

Details

As steps are estimated by prep, these operations are applied to the training set. Rather than running bake() to duplicate this processing, this function will return variables from the processed training set.

When preparing a recipe, if the training data set is retained using retain = TRUE, there is no need to bake() the recipe to get the preprocessed training set.

juice() will return the results of a recipe where all steps have been applied to the data, irrespective of the value of the step's skip argument.

See Also


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.