Skip to content

Conversation

@EmilHvitfeldt
Copy link
Member

Longstanding issue, somehow without an issue. surprisingly easy to fix.

Before:

library(recipes)

recipe(mpg ~ ., data = mtcars) |> 
  step_normalize(all_predictors(), num_comps = 3) |>
  prep()
#> Error in `step_normalize()`:
#> Caused by error in `prep()`:
#> ! Can't rename variables in this context.

After:

library(recipes)

recipe(mpg ~ ., data = mtcars) |> 
  step_normalize(all_predictors(), num_comps = 3) |>
  prep()
#> Error in `step_normalize()`:
#> Caused by error in `prep()`:
#> ! The following argument was specified but not available: `num_comps`.

@EmilHvitfeldt EmilHvitfeldt requested a review from simonpcouch May 28, 2024 19:42
Copy link
Contributor

@simonpcouch simonpcouch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wonderful. :) I remember tripping up on helping someone with this error message in a workshop last year.

EmilHvitfeldt and others added 2 commits May 29, 2024 09:14
Co-authored-by: Simon P. Couch <simonpatrickcouch@gmail.com>
@github-actions
Copy link
Contributor

This pull request 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 Jun 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants