Learn R Programming

salso (version 0.1.9)

enumerate.permutations: Enumerate Permutations of Items

Description

This function produces a matrix whose rows provide all possible permutations of the set of integers {0, 1, ..., n-1}.

Usage

enumerate.permutations(nItems)

Arguments

nItems

The size of the set {0, 1, ..., n-1}, i.e., n.

Value

A matrix of integers, where each row is a permutation.

Examples

Run this code
# NOT RUN {
enumerate.permutations(5)

# }

Run the code above in your browser using DataLab