Recipe Target

tar_recipe(name, x, ...)

# S3 method for default
tar_recipe(name, x, ...)

# S3 method for data.frame
tar_recipe(name, x, formula = NULL, ..., tar_args = list())

# S3 method for formula
tar_recipe(name, formula, data, ..., tar_args = list())

# S3 method for matrix
tar_recipe(name, x, ..., tar_args = list())

Arguments

name

Name of target

x

A data frame or tibble of the template data set (see below).

...

Additional functions that the recipe is passed to, i.e. recipe step functions.

formula

A model formula. No in-line functions should be used here (e.g. log(x), x:y, etc.) and minus signs are not allowed. These types of transformations should be enacted using step functions in this package. Dots are allowed as are simple multivariate outcome terms (i.e. no need for cbind; see Examples). A model formula may not be the best choice for high-dimensional data with many columns, because of problems with memory.

tar_args

Arguments passed to tar_target.

data

A data frame or tibble of the template data set (see below).

Value

A tar_target object.

Examples

if (FALSE) { # Basic recipe tar_recipe( make_recipe, x = mtcars, formula = mpg ~ ., step_dummy(gear, carb), tar_args = list(format = "qs") ) }