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

Specify which step produces error #420

Closed
EmilHvitfeldt opened this issue Dec 2, 2019 · 2 comments · Fixed by #1069
Closed

Specify which step produces error #420

EmilHvitfeldt opened this issue Dec 2, 2019 · 2 comments · Fixed by #1069
Labels
feature a feature request or enhancement

Comments

@EmilHvitfeldt
Copy link
Member

Not all steps report which step they are produced inside. It can lead to slowness when debugging. This is a more general issue that contains #394.

library(recipes)

recipe(~ ., data = iris) %>%
  step_dummy(Sepal.Length) %>%
  step_center(all_predictors()) %>%
  step_scale(all_predictors()) %>%
  prep()
#> Warning: The following variables are not factor vectors and will be ignored:
#> `Sepal.Length`
#> Error: The `terms` argument in `step_dummy` did not select any factor columns.

recipe(~ ., data = iris) %>%
  step_discretize(Species) %>%
  step_center(all_predictors()) %>%
  step_scale(all_predictors()) %>%
  prep()
#> Error: All columns selected for the step should be numeric

Created on 2019-12-01 by the reprex package (v0.3.0)

@gacolitti
Copy link

Additionally, it would be nice if the error returned the name of the non-numeric column that triggered the error.

@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 Dec 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
3 participants