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)
Created on 2022-04-22 by the reprex package (v2.0.1)