permutations (version 1.0-9)

allperms: All permutations of a given size

Description

Returns all n factorial permutations of a set

Usage

allperms(n)

Arguments

n

The size of the set, integer

Author

Robin K. S. Hankin

Details

The function is very basic (the idiom is word(t(partitions::perms(n)))) but is here for completeness.

Examples

Run this code

as.cycle(allperms(5))

Run the code above in your browser using DataCamp Workspace