Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

step_dummy with no variable selected #348

Closed
topepo opened this issue Jun 27, 2019 · 2 comments
Closed

step_dummy with no variable selected #348

topepo opened this issue Jun 27, 2019 · 2 comments

Comments

@topepo
Copy link
Member

topepo commented Jun 27, 2019

@kjell-stattenacity In cases where step_dummy() receives no variables, it should not just fail.

library(tidymodels)

zdat <- tibble(
  y = c(1, 2, 3), 
  x = c("a", "a", "a"),
  z = 3:1
  )

transform_recipe2 <- recipe(y ~ x, data = zdat) %>%
  step_zv(all_predictors()) %>% 
  step_dummy(all_predictors()) %>%
  prep(training = zdat)
@topepo
Copy link
Member Author

topepo commented Jun 28, 2019

Changes have been checked in if you want to test

@github-actions
Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant