ddiscrete | R Documentation |
Creates a discrete probability function based on x
with resolution unit
.
If unit
is not given then unit will be 10, 100, 1000, ... depending
on the length of the discrete probability function.
ddiscrete(x, unit = NULL, zero = FALSE)
x |
numeric: number of elements of vector of initial probabilities |
unit |
integer: reciprocal of smallest non-zero probability (default: |
zero |
logical: zeros in the final probabilities allowed (default: |
a discrete probability function
ddiscrete(runif(6))
ddiscrete(6)
ddiscrete(6, 20)
ddiscrete(c(1,0,0,0), zero=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.