# standard uniform Dirichlet
rpdirichlet(5, c(1,1,1,1), 4)
rpdirichlet(5, c(1,1,1,1), 4, drop_fixed = FALSE)
# two ternary outcomes: (a1,a2,a3, b1,b2,b3)
rpdirichlet(5, c(9,5,1, 3,6,6), c(3,3))
rpdirichlet(5, c(9,5,1, 3,6,6), c(3,3), drop_fixed = FALSE)
Run the code above in your browser using DataLab