Learn R Programming

RcppDynProg (version 0.2.1)

all_partitions: Build all partitions into intervals.

Description

Build all partitions into intervals.

Usage

all_partitions(n, kmax = n)

Value

list of all partitions.

Arguments

n

integer, sequence lenght to choose from.

kmax

int, maximum number of segments in solution.

Examples

Run this code

all_partitions(4, 2)

Run the code above in your browser using DataLab