Description Usage Arguments Value Examples
Random vector of N integers that sum to M (https://stackoverflow.com/questions/24845909/generate-n-random-integers-that-sum-to-m-in-r)
1 | rand_vect(N,M)
|
N |
Size of the vector. |
M |
Sum of elements in the vector. |
sd |
Approximate standard deviation for elements of vector (default = 1). |
pos.only |
Resulting vector contains only positive integers (default = TRUE) |
Vector of size N
with elements summing to M
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.