permutations: All Permutations of Integers 1:n

View source: R/matchClasses.R

permutationsR Documentation

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(s)

Friedrich Leisch

Examples

permutations(3)

e1071 documentation built on Feb. 16, 2023, 8:31 p.m.