Skip to content

Determine names of the outcome data in a workflow

Usage

outcome_names(x, ...)

# S3 method for terms
outcome_names(x, ...)

# S3 method for formula
outcome_names(x, ...)

# S3 method for recipe
outcome_names(x, ...)

# S3 method for workflow
outcome_names(x, ...)

# S3 method for tune_results
outcome_names(x, ...)

Arguments

x

An object.

...

Not used.

Value

A character string of variable names

Examples

library(dplyr)
lm(cbind(mpg, wt) ~ ., data = mtcars) %>%
  purrr::pluck(terms) %>%
  outcome_names()
#> [1] "mpg" "wt"