Description Usage Arguments Value Note References Examples
View source: R/setPartitions.R
Enumeration of set partitions given the number of elements in a set
1 2 3 | setPartitions(num)
setPartitions_restricted(num, group = NULL, apart = NULL)
|
num |
the number of elements in a set |
group |
a vector indicating which elements should be grouped together |
apart |
a vector indicating which elements should not be grouped together |
a matrix of all set partitions
This function is based on the setparts
function from "partitions"
package (R. K. S. Hankin) with modifications for FCBMA problem.
R. K. S. Hankin 2007. "Set partitions in R". Journal of Statistical Software, Volume 23, code snippet 2
R. K. S. Hankin 2006. Additive integer partitions in R. Journal of Statistical Software, Code Snippets 16(1)
Hu, S., O'Hagan, A. and Murphy, T. B. (2018). Motor insurance claims modelling with factor collapsing and Bayesian model averaging
1 2 | setPartitions(4)
setPartitions_restricted(num=4, group=NULL, apart=c(2,3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.