permorder: The order of a permutation

Description Usage Arguments Details Note Author(s) See Also Examples

Description

Returns the order of a permutation P: the smallest strictly positive integer n for which P^n is the identity.

Usage

1
permorder(x, singly = TRUE)

Arguments

x

Permutation, coerced to cycle form

singly

Boolean, with default TRUE meaning to return the order of each element of the vector, and FALSE meaning to return the order of the vector itself (that is, the smallest strictly positive integer for which all(x^n==id)).

Details

Coerces its argument to cycle form.

The order of the identity permutation is 1.

Note

Uses mLCM() from the numbers package.

Author(s)

Robin K. S. Hankin

See Also

sgn

Examples

1
2
3
4
5
6


Search within the permutations package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.