Hankin, R. K. S. “Urn Sampling Without Replacement: Enumerative Combinatorics in R”. Journal of Statistical Software, Code Snippets, vol. 17, no. 1, Jan. 2007, pp. 1-6, doi:10.18637/jss.v017.c01.