Get a table of quantile intervals ("qi") corresponding to a vector of interval widths.
Source:R/tidy_quantiles_to_median_qi.R
widths_to_qi_table.RdThese intervals are also called "equal-tailed intervals". An interval
of width x ranges from the 0.5 - x / 2 quantile to the
0.5 + x / 2 quantile.
Arguments
- widths
Vector of interval widths. All entries must be between 0 and 1, inclusive. Duplicate entries are ignored.
- quantile_tol
Round quantile level values to this many decimal places, to avoid problems with floating point number equality comparisons. Passed as the
digitsargument tobase::round(). Default 10.
Value
A table of available intervals, as a
tibble, with columns
.lower_quantile, .upper_quantile, and .width,
that give the bounds and the widths of the requested
intervals.