Skip to content

check recipe argument in check_step_check_args() #1404

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

Closed
EmilHvitfeldt opened this issue Dec 18, 2024 · 1 comment
Closed

check recipe argument in check_step_check_args() #1404

EmilHvitfeldt opened this issue Dec 18, 2024 · 1 comment
Labels
upkeep maintenance, infrastructure, and similar

Comments

@EmilHvitfeldt
Copy link
Member

we should add a check in check_step_check_args() to make sure that the recipe argument contains a recipe.

This will also make it so calling step_scale(all_numeric()) by itself (from missing pipe) gives better error

library(recipes)

recipe(mpg ~ ., mtcars)
#> 
#> ── Recipe ──────────────────────────────────────────────────────────────────────
#> 
#> ── Inputs
#> Number of variables by role
#> outcome:    1
#> predictor: 10
  step_scale(all_numeric())
#> Error in `*tmp*`$steps: $ operator is invalid for atomic vectors
@EmilHvitfeldt EmilHvitfeldt added the upkeep maintenance, infrastructure, and similar label Dec 18, 2024
@EmilHvitfeldt EmilHvitfeldt changed the title check rec argument in check_step_check_args() check recipe argument in check_step_check_args() Dec 18, 2024
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 Apr 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
upkeep maintenance, infrastructure, and similar
Projects
None yet
Development

No branches or pull requests

1 participant