setPartitions: Generate set partitions

Description Usage Arguments Value Note References Examples

View source: R/setPartitions.R

Description

Enumeration of set partitions given the number of elements in a set

Usage

1
2
3

Arguments

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

Value

a matrix of all set partitions

Note

This function is based on the setparts function from "partitions" package (R. K. S. Hankin) with modifications for FCBMA problem.

References

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

Examples

1
2

senhu/FCBMA documentation built on Aug. 6, 2019, 4:56 p.m.