Learn R Programming

recipes (version 0.1.0)

terms_select: Select Terms in a Step Function.

Description

This function bakees the step function selectors and might be useful when creating custom steps.

Usage

terms_select(terms, info)

Arguments

terms

A list of formulas whose right-hand side contains quoted expressions. See quos for examples.

info

A tibble with columns variable, type, role, and source that represent the current state of the data. The function summary.recipe can be used to get this information from a recipe.

Value

A character string of column names or an error of there are no selectors or if no variables are selected.

See Also

recipe summary.recipe prep.recipe

Examples

Run this code
# NOT RUN {
library(rlang)
data(okc)
rec <- recipe(~ ., data = okc)
info <- summary(rec)
terms_select(info = info, quos(all_predictors()))
# }

Run the code above in your browser using DataLab