permorder | R Documentation |
Returns the order of a permutation P: the smallest strictly positive integer n for which P^n is the identity.
permorder(x, singly = TRUE)
x |
Permutation, coerced to |
singly |
Boolean, with default |
Coerces its argument to cycle form.
The order of the identity permutation is 1.
Uses mLCM()
from the numbers
package.
Robin K. S. Hankin
sgn
x <- rperm(5,20) permorder(x) permorder(x,FALSE) stopifnot(all(is.id(x^permorder(x)))) stopifnot(is.id(x^permorder(x,FALSE)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.