tune
tune copied to clipboard
uninformative warning for unnamed arguments
When unnamed arguments are passed to ..., the warning message is a bit 🤨
library(tidymodels)
# mistakenly forget to pass metrics argument name
fit_resamples(
linear_reg(),
mpg ~ .,
bootstraps(mtcars, 5),
metric_set(rmse)
)
#> Warning: The `...` are not used in this function but one or more objects were
#> passed: ''
#> # Resampling results
#> # Bootstrap sampling
#> # A tibble: 5 × 4
#> splits id .metrics .notes
#> <list> <chr> <list> <list>
#> 1 <split [32/11]> Bootstrap1 <tibble [2 × 4]> <tibble [0 × 3]>
#> 2 <split [32/15]> Bootstrap2 <tibble [2 × 4]> <tibble [0 × 3]>
#> 3 <split [32/15]> Bootstrap3 <tibble [2 × 4]> <tibble [0 × 3]>
#> 4 <split [32/13]> Bootstrap4 <tibble [2 × 4]> <tibble [0 × 3]>
#> 5 <split [32/14]> Bootstrap5 <tibble [2 × 4]> <tibble [0 × 3]>
Created on 2024-01-23 with reprex v2.1.0