How do I randomly partition an integer into n parts, with zero a possible outcome? (Preferably in R)
For example, to partition the integer number 5 into 3 parts and do this 4 times, I might get this output:
[1] 4 0 1
[2] 2 2 1
[3] 0 2 3
[4] 1 1 3
Thanks!