Description Usage Arguments Value Examples
Approximate a given probability distribution probs to a given
tolerance tol.
1  | approximate(probs, tol)
 | 
probs | 
 Numeric vector giving a probability distribution.  | 
tol | 
 Numeric giving the tolerance.  | 
Dist object approximate from probs with tolerance tol.
1 2 3 4 5 6 7 8 9 10  | # Approximate distributions with different tolerance
p <- c(0.12345, 0.23456, 1.0 - 0.12345 - 0.23456)
d <- approximate(p, tol = 0.1)
dump(d)
d <- approximate(p, tol = 0.001)
dump(d)
d <- approximate(p, tol = 0.00001)
dump(d)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.