Helper function to check that input quantiles are valid. Quantiles must be in the range specified, increase monotonically, and contain no duplicates.
This is used in bias_range()
and bias_quantile()
to
provide informative errors to users.
check_quantiles(quantiles, name = "quantiles", range = c(0, 1))
None. Function errors if quantiles are invalid.
Numeric vector of quantiles to check
Character name to use in error messages
Numeric vector giving allowed range