Access a distribution's cumulative distribution function (cdf).

eval_cdf(object, at)

get_cdf(object)

enframe_cdf(object, at, arg_name = ".arg", fn_name = ".cdf")

Arguments

object

Distribution object.

at

Vector of values to evaluate the cdf at.

arg_name

Name of the column containing the function arguments, in the output data frame of enframe_.

fn_name

Name of the column containing the function evaluations, in the output data frame of enframe_.

Value

A vector of the evaluated cdf, in the case of eval_; a data frame with both the argument and function evaluations, in the case of enframe_; or a vectorized function representing the cdf, in the case of get_.

See also

Other distributional representations: eval_density(), eval_hazard(), eval_pmf(), eval_quantile(), eval_survival(), get_chf()

Examples

d <- dst_unif(0, 4) eval_cdf(d, at = 0:4)
#> [1] 0.00 0.25 0.50 0.75 1.00
enframe_cdf(d, at = 0:4)
#> .arg .cdf #> 1 0 0.00 #> 2 1 0.25 #> 3 2 0.50 #> 4 3 0.75 #> 5 4 1.00
cdf <- get_cdf(d) cdf(0:4)
#> [1] 0.00 0.25 0.50 0.75 1.00