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

check_type() should list offending variables #1217

Closed
EmilHvitfeldt opened this issue Oct 1, 2023 · 1 comment · Fixed by #1235
Closed

check_type() should list offending variables #1217

EmilHvitfeldt opened this issue Oct 1, 2023 · 1 comment · Fixed by #1235
Labels
feature a feature request or enhancement

Comments

@EmilHvitfeldt
Copy link
Member

you see that something was wrong, but it doesn't list which variables were bad. I think we could same people some time by being more informative here

library(recipes)

data("ames", package = "modeldata")

recipe(Sale_Price ~ ., data = ames) |>
  step_dummy(starts_with("Lot_")) |>
  prep() |>
  bake()
#> Error in `step_dummy()`:
#> Caused by error in `prep()`:
#> ! All columns selected for the step should be string, factor, or ordered.

ames |>
  select(starts_with("Lot_")) |>
  glimpse()
#> Rows: 2,930
#> Columns: 4
#> $ Lot_Frontage <dbl> 141, 80, 81, 93, 74, 78, 41, 43, 39, 60, 75, 0, 63, 85, 0…
#> $ Lot_Area     <int> 31770, 11622, 14267, 11160, 13830, 9978, 4920, 5005, 5389…
#> $ Lot_Shape    <fct> Slightly_Irregular, Regular, Slightly_Irregular, Regular,…
#> $ Lot_Config   <fct> Corner, Inside, Corner, Corner, Inside, Inside, Inside, I…
@EmilHvitfeldt EmilHvitfeldt added the feature a feature request or enhancement label Oct 1, 2023
@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 Oct 28, 2023
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
Development

Successfully merging a pull request may close this issue.

1 participant