Skip to content

step_normalize() errors if only applied to one variable #963

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 Apr 22, 2022 · 1 comment · Fixed by #972
Closed

step_normalize() errors if only applied to one variable #963

EmilHvitfeldt opened this issue Apr 22, 2022 · 1 comment · Fixed by #972
Labels
bug an unexpected problem or unintended behavior

Comments

@EmilHvitfeldt
Copy link
Member

library(recipes)

recipe(~., data = mtcars) %>%
  step_normalize(disp) %>%
  prep()
#> Error in array(STATS, dims[perm]): 'dims' cannot be of length 0

recipe(~., data = mtcars) %>%
  step_normalize(disp, vs) %>%
  prep()
#> Recipe
#> 
#> Inputs:
#> 
#>       role #variables
#>  predictor         11
#> 
#> Training data contained 32 data points and no missing data.
#> 
#> Operations:
#> 
#> Centering and scaling for disp, vs [trained]

Created on 2022-04-22 by the reprex package (v2.0.1)

@EmilHvitfeldt EmilHvitfeldt added the bug an unexpected problem or unintended behavior label Apr 22, 2022
@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 May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant