tidymodels / dials

Tools for creating tuning parameter values
https://dials.tidymodels.org/
Other
111 stars 26 forks source link

Allow `label = NULL` for `new_quant_param()` #266

Closed hfrick closed 1 year ago

hfrick commented 1 year ago

When using label = NULL, we get an error - which says NULL is allowed... The docs for new_quant_param() also say that the label is optional, so I assume it's check_label() that needs fixing here.

library(dials)
#> Loading required package: scales

new_quant_param(type = "double", range = c(0, 1), inclusive = c(TRUE, TRUE),
                label = NULL)
#> Error in `new_quant_param()`:
#> ! `label` should be a single named character string or NULL.

#> Backtrace:
#>     ▆
#>  1. └─dials::new_quant_param(...)
#>  2.   └─dials:::check_label(label)
#>  3.     └─rlang::abort(...)

Created on 2022-11-23 with reprex v2.0.2

github-actions[bot] commented 1 year ago

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.