powered by
x
P
Generic method for obtaining the conditional distribution of a distribution object x given condition P.
conditional(x, P, ...)
A distribution object for the conditional distribution.
The empirical distribution object.
The predicate function to condition x on
additional arguments to pass into P
# \donttest{ d <- empirical_dist(1:100) # condition on values greater than 50 d_gt50 <- conditional(d, function(x) x > 50) mean(d_gt50) # }
Run the code above in your browser using DataLab