x given condition P.R/generic_dist.R
conditional.RdGeneric method for obtaining the conditional distribution of a distribution
object x given condition P.
conditional(x, P, ...)A distribution object for the conditional distribution.
# \donttest{
d <- empirical_dist(1:100)
# condition on values greater than 50
d_gt50 <- conditional(d, function(x) x > 50)
mean(d_gt50)
#> [1] 75.5
# }