This is a function, used for generating the permutations used for the Exact distribution of many of the statistical procedures in Hollander, Wolfe, Chicken - Nonparametric Statistical Methods Third Edition, to generate possible combinations of the first n=n1+n2+...+nk integers within k groups.
Contains the group sizes n1,n2,...,nk
The computations involved get very time consuming very quickly, so be careful not to use it for too many large groups.
Returns a matrix of n!/(n1!*n2!*...*nk!) rows, where each row represents one possible combination.
##What are the ways that we can group 1,2,3,4,5 into groups of 2, 2, and 1? multComb(c(2,2,1)) ##Another example, with four groups multComb(c(2,2,3,2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.