Description Usage Arguments Author(s) See Also Examples
The function outputs a random sample from the Dirichlet distribution.
1 | rdirichlet(n, alpha)
|
n |
Sample size |
alpha |
Parameter vector |
Code is taken from Greg's Miscellaneous Functions (gregmisc). His code was based on code posted by Ben Bolker to R-News on 15 Dec 2000.
1 | x <- rdirichlet(10, c(1,2,3) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.