f with respect to x.R/generic_dist.R
expectation.RdGeneric method for obtaining the expectation of f with respect to
x.
expectation(x, g, ...)The expected value of g(x).
# \donttest{
x <- exponential(1)
# E[X] for Exp(1) is 1
expectation(x, function(t) t)
#> [1] 1
# }