Learn R Programming

Fast Generators and Iterators for Permutations, Combinations, Integer Partitions and Compositions

Github: https://github.com/randy3k/arrangements

Documentation: https://randy3k.github.io/arrangements/

Fast generators and iterators for permutations, combinations, integer partitions and compositions. The arrangements are in lexicographical order and generated iteratively in a memory efficient manner. It has been demonstrated that ‘arrangements’ outperforms most existing packages of similar kind. Benchmarks could be found at https://randy3k.github.io/arrangements/articles/benchmark.html.

Installation

You can install the released version of arrangements from CRAN with:

install.packages("arrangements")

Install the latest development version using

devtools::install_github("randy3k/arrangements")

Copy Link

Version

Install

install.packages('arrangements')

Monthly Downloads

3,624

Version

1.1.10

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Randy Lai

Last Published

March 22nd, 2026

Functions in arrangements (1.1.10)

compositions

Compositions generator
combinations

Combinations generator
ncompositions

Number of compositions
npartitions

Number of partitions
Permutations

Permutations iterator
ncombinations

Number of combinations
arrangements-package

arrangements: Fast Generators and Iterators for Permutations, Combinations, Integer Partitions and Compositions
permutations

Permutations generator
partitions

Partitions generator
npermutations

Number of permutations
Combinations

Combinations iterator
Partitions

Partitions iterator
Compositions

Compositions iterator