Learn R Programming

e1071 (version 1.6-7)

permutations: All Permutations of Integers 1:n

Description

Returns a matrix containing all permutations of the integers 1:n (one permutation per row).

Usage

permutations(n)

Arguments

n
Number of element to permute.

Examples

Run this code
permutations(3)

Run the code above in your browser using DataLab