all_multinom | R Documentation |
The total number of rows is choose(n = k + n - 1, k = k - 1)
.
This function uses recursion, so is not the most efficient.
all_multinom(n, k)
n |
Number of indistinguishable balls. |
k |
Number of distinguishable bins. |
A matrix, rows index different possible multinomial counts, the columns index the bins.
David Gerard
n <- 5
k <- 3
all_multinom(n = n, k = k)
choose(n = n + k - 1, k = k - 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.