recipes icon indicating copy to clipboard operation
recipes copied to clipboard

tidyselect doesn't work with step_interact()

Open EmilHvitfeldt opened this issue 3 months ago • 0 comments

library(tidymodels)

recipe(mpg ~ ., data = mtcars) %>% 
  step_interact(terms = starts_with("dis")) %>% 
  prep() %>% 
  bake(new_data = NULL)
#> Error in `step_interact()`:
#> Caused by error:
#> ! `starts_with()` must be used within a *selecting* function.
#> ℹ See <https://tidyselect.r-lib.org/reference/faq-selection-context.html> for
#>   details.

EmilHvitfeldt avatar Apr 26 '24 19:04 EmilHvitfeldt