Skip to contents

Returns all length-k permutations of the integers from 1 to n, in lexicographic order.

Usage

OR.permutations(n, k)

Arguments

n

Integer size of the set.

k

Integer number of elements per permutation.

Value

Integer matrix with factorial(n)/factorial(n-k) rows and k columns.

See also

Other other: OR.collapse(), OR.read.csv.stub()