range: Range of Distribution

range.finiteR Documentation

Range of Distribution

Description

Range returns a 2 index vector with the 0th index containing the minimum value, and the 1st index containing the maximum value for a given distribution.

Usage

## S3 method for class 'finite'
range(distribution, ...)

## S3 method for class 'dst'
range(distribution, ...)

Arguments

distribution

Single distribution to compute range from.

...

Not used; vestige of the base::range() S3 generic.

Details

If there are no methods for the distribution's class, the range is calculated using eval_quantile() at 0 and at 1.

Examples

a <- dst_gpd(0, 1, 0.5)
b <- dst_unif(0, 1)
c <- dst_norm(3, 4)
range(a)
range(b)
range(c)

vincenzocoia/distionary documentation built on March 5, 2024, 3:13 a.m.