Description Usage Arguments Value Author(s) Examples
Generate random deviates from the Dirichlet distribution.
1 | rdirichlet(n, alpha)
|
n |
Number of random vectors to generate. |
alpha |
Vector containing shape parameters. |
returns a matrix with n rows, each containing a single Dirichlet random deviate.
Code original posted by Ben Bolker to R-News on Fri Dec 15 2000. See http://www.r-project.org/nocvs/mail/r-help/2000/3865.html. Ben attributed the code to Ian Wilson <i.wilson
1 | rdirichlet(20, c(1,1,1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.