rdirichlet {phybase} | R Documentation |
This function can generate random numbers from a dirichlet distribution.
rdirichlet(n,a)
n |
the number of random numbers to be generated |
a |
shape parameters of the dirichlet distribution |
The function returns random numbers from a dirichlet distribution.
Code is taken from Greg's Miscellaneous Functions (gregmisc). His code was based on code posted by Ben Bolker to R-News on Fri Dec 15 2000.
rdirichlet(1,c(3,3,3))