Learn R Programming

mpoly (version 1.1.1)

partitions: Enumerate the partitions of an integer

Description

Determine all unrestricted partitions of an integer. This function is equivalent to the function parts in the partitions package.

Usage

partitions(n)

Arguments

n

an integer

Value

a matrix whose rows are the n-tuples

Examples

Run this code
# NOT RUN {
partitions(5)
str(partitions(5))
# }

Run the code above in your browser using DataLab