empirical_dist object x.R/empirical_dist.R
cdf.empirical_dist.RdIf x is a multivariate empirical distribution, this function will
throw an error. It's only defined for univariate empirical distributions.
# S3 method for class 'empirical_dist'
cdf(x, ...)A function that takes a numeric vector t and returns the
empirical cdf of x evaluated at t.
ed <- empirical_dist(c(1, 2, 3, 4, 5))
Fx <- cdf(ed)
Fx(3) # 0.6
#> [1] 0.6
Fx(c(1, 5)) # 0.2, 1.0
#> [1] 0.2 1.0