-
Notifications
You must be signed in to change notification settings - Fork 120
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
First seen in tidymodels/TMwR#367
library(tidymodels)
tidymodels_prefer()
theme_set(theme_bw())
options(pillar.advice = FALSE, pillar.min_title_chars = Inf)
ns_rec <-
recipe(mpg ~ ., data = mtcars) %>%
step_ns(disp, deg_free = 3) %>%
prep()
bake(ns_rec, mtcars %>% slice(1))
#> Error in if (num < 1) {: argument is of length zero
ns2_rec <-
recipe(mpg ~ ., data = mtcars) %>%
step_spline_natural(disp, deg_free = 3) %>%
prep()
bake(ns2_rec, mtcars %>% slice(1))
#> Error in if (num < 1) {: argument is of length zero
Created on 2023-08-25 with reprex v2.0.2
For step_ns()
, it is an issue with stripping off attributes (I assume the dim
attribute).
For step_spline_natrual()
, it is using I()
rowwise that is dropping the dimension.
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior