Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get1

Retrieve particular cycles or components of cycles


Description

Given an object of class cycle, function get1() returns a representative of each of the disjoint cycles in the object's elements. Function get_cyc() returns the cycle containing a specific element.

Usage

get1(x,drop=TRUE)
get_cyc(x,elt)

Arguments

x

permutation object (coerced to cycle class)

drop

In function get1(), argument drop controls the behaviour if x is length 1. If drop is TRUE, then a vector of representative elements is returned; if FALSE, then a list with one vector element is returned

elt

Length-one vector interpreted as a permutation object

Author(s)

Robin K. S. Hankin

Examples

data(megaminx)
get1(megaminx)
get1(megaminx[1])
get1(megaminx[1],drop=TRUE)

get_cyc(megaminx,11)

permutations

The Symmetric Group: Permutations of a Finite Set

v1.0-9
GPL-2
Authors
Robin K. S. Hankin [aut, cre] (<https://orcid.org/0000-0001-5982-0415>), Paul Egeler [ctb] (<https://orcid.org/0000-0001-6948-9498>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.