Distribution Quantiles
quantile.Rd
Access a distribution's quantiles.
Usage
eval_quantile(distribution, at)
enframe_quantile(..., at, arg_name = ".arg", fn_prefix = "quantile", sep = "_")
Arguments
- distribution, ...
A distribution, or possibly multiple distributions in the case of
...
.- at
Vector of values to evaluate the cdf at. Must be named when using in
enframe_
.- arg_name
For
enframe_
, name of the column containing the function arguments.- fn_prefix
For
enframe_
, name of the function to appear in the column(s).- sep
When
enframe
'ing more than one distribution, the character that will be separating thefn_name
and the distribution name.
Value
The evaluated quantiles in vector form (for eval_
) and data frame
or tibble form (for enframe_
).
See also
Other distributional representations:
eval_cdf()
,
eval_chf()
,
eval_density()
,
eval_hazard()
,
eval_odds()
,
eval_pmf()
,
eval_return()
,
eval_survival()
Examples
d <- dst_unif(0, 4)
eval_quantile(d, at = 1:9 / 10)
#> [1] 0.4 0.8 1.2 1.6 2.0 2.4 2.8 3.2 3.6
enframe_quantile(d, at = 1:9 / 10)
#> # A tibble: 9 × 2
#> .arg quantile
#> <dbl> <dbl>
#> 1 0.1 0.4
#> 2 0.2 0.8
#> 3 0.3 1.2
#> 4 0.4 1.6
#> 5 0.5 2
#> 6 0.6 2.4
#> 7 0.7 2.8
#> 8 0.8 3.2
#> 9 0.9 3.6