Learn R Programming

PerMallows (version 1.14)

perm2cycles: Decompose a permutation in a set of cycles

Description

Factor a given a permutation in the set of independent cycles

Usage

perm2cycles(perm)

Value

The permutation in the input in which the operation has been applied

Arguments

perm

a permutation

Examples

Run this code
perm2cycles(c(1,5,2,3,4))

Run the code above in your browser using DataLab