Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

summ_quantile

Summarize distribution with quantiles


Description

Essentially, this is a more strict wrapper of as_q(f)(probs). If any value in probs is outside of segment \[0; 1\], an error is thrown.

Usage

summ_quantile(f, probs)

Arguments

f

A pdqr-function representing distribution.

probs

Vector of probabilities for which quantiles should be returned.

Value

A numeric vector of the same length as probs representing corresponding quantiles.

See Also

Examples

d_norm <- as_d(dnorm)
probs <- c(0.25, 0.5, 0.75)
all.equal(summ_quantile(d_norm, probs), as_q(d_norm)(probs))

pdqr

Work with Custom Distribution Functions

v0.3.0
MIT + file LICENSE
Authors
Evgeni Chasnovski [aut, cre] (<https://orcid.org/0000-0002-1617-4019>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.