qdist: The general quantile function

Description Usage Arguments Value Examples

View source: R/utils.R

Description

The general quantile function

Usage

1
qdist(dist, p, arg_list, lookup_verbose = F, ...)

Arguments

dist

character string, specification of the distribution of interest using the abbreviations from distributions

p

numeric vector of probabilities

arg_list

list, alternative to directly using the names of the arguments for the distribution of choice, the user can provide a list with those arguments enclosed. This is useful for when multiple distributions need to be drawn from.

lookup_verbose

logical, whether to print the abbreviated name found in the dist_lookup_table

...

arguments specific to the distribution of interest (e.g. the "binom" distribution requires arguments for size and prob)

Value

a numeric vector representing the quantiles of the distribution of interest

Examples

1
2
## use curve and qdist to visualize the quantiles of a distribution
curve(qdist("pois", x, lambda=3), from=0, to=1)

salauer/gdist documentation built on Oct. 4, 2020, 11:09 p.m.