| conditional | R Documentation |
x given condition P.Generic method for obtaining the conditional distribution of a distribution
object x given condition P.
conditional(x, P, ...)
x |
The empirical distribution object. |
P |
The predicate function to condition |
... |
additional arguments to pass into |
A distribution object for the conditional distribution.
d <- empirical_dist(1:100)
# condition on values greater than 50
d_gt50 <- conditional(d, function(x) x > 50)
mean(d_gt50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.