Learn R Programming

e1071 (version 1.7-16)

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.

Author

Friedrich Leisch

Examples

Run this code
permutations(3)

Run the code above in your browser using DataLab