powered by
This function draws from a Dirichlet distribution.
rdirichlet(n = 1, concentration)
If n = 1 a vector of length p, else a matrix of dimension n times p with samples as rows.
n = 1
vector
p
matrix
n
An integer, the number of samples.
integer
The non-negative concentration vector of length p.
rdirichlet(concentration = 1:3) rdirichlet(n = 4, concentration = 1:2)
Run the code above in your browser using DataLab