powered by
Generates cell probabilities from the Dirichlet distribution.
rdirichlet(n = 1, alpha)
A matrix of n rows and k columns, where n is the number of observations and k is the number of cells.
The number of observations.
The shape parameters of the Dirichlet distribution.
Kaifeng Lu, kaifenglu@gmail.com
rdirichlet(2, c(50, 20, 30))
Run the code above in your browser using DataLab