dials
dials copied to clipboard
Better error message when using range argument wrong
The following error was extracted from https://stackoverflow.com/questions/72619333/error-range-must-have-an-upper-and-lower-bound-inf-and-unknown-are-acceptabl.
If you pass a range of numbers into range you get the following message which at first glance suggests Inf or unknown() is at fault
library(dials)
trees(range = c(100, 2000, by = 100))
#> Error in `range_validate()`:
#> ! `range` must have an upper and lower bound. `Inf` and `unknown()` are acceptable values.