Hankin, Robin K. S., and Luke J. West. 2007. “Set Partitions in R”. Journal of Statistical Software, Code Snippets 23 (2):1-12. https://doi.org/10.18637/jss.v023.c02.