powered by
Generates a vector of uniformly distributed random numbers which sum to 1.
rSum21(size, digits = NULL)
a vector of length size with elements drawn
a non-negative integer giving the number of numbers to generate.
integer indicating the number of decimal places to be used.
Andri Signorell <andri@signorell.net>
runif, (Dirichlet distribution)
runif
# generate 5 numbers x <- rSum21(5) sum(x)
Run the code above in your browser using DataLab