ddist: The general density distribution

Description Usage Arguments Value Examples

View source: R/utils.R

Description

The general density distribution

Usage

1
ddist(dist, x, arg_list, lookup_verbose = F, ...)

Arguments

dist

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

x

numeric vector of quantiles

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 density of the distribution of interest

Examples

1
2
## use curve and ddist to visualize a distribution
curve(ddist("lnorm", x, meanlog=1.23, sdlog=0.79), from=0, to=20)

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