rdirichlet | R Documentation |
Generates cell probabilities from the Dirichlet distribution.
rdirichlet(n = 1, alpha)
n |
The number of observations. |
alpha |
The shape parameters of the Dirichlet distribution. |
A matrix of n rows and k columns, where n is the number of observations and k is the number of cells.
Kaifeng Lu, kaifenglu@gmail.com
rdirichlet(2, c(50, 20, 30))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.