partitioning: Partitioning

Description Usage Arguments Value Examples

View source: R/partitioning.R

Description

Partition a number n of items into all possible different subsets. The number of partitions is given by the Bell number ‘B_n’.

Usage

1

Arguments

n

Numeric specifying the number of items of the set to partition.

Value

Matrix giving all possible partitioning schemata.

Examples

1
2
3
4
5
6
# All possible partitions of a set with 2 items
partitioning(2)

# All possible partitions of a set with 4 items
P <- partitioning(4)
t(P)

rinform documentation built on April 1, 2018, 12:12 p.m.