Generic method for obtaining the quantile (inverse cdf) of an object.

inv_cdf(x, ...)

Arguments

x

The object to obtain the quantile of.

...

Additional arguments to pass.

Value

A function computing the quantile (inverse CDF).

Examples

x <- normal(0, 1)
Q <- inv_cdf(x)
Q(0.5)   # 0 (median of standard normal)
#> [1] 0
Q(0.975) # approximately 1.96
#> [1] 1.959964