c: Concatenation of permutations

Description Usage Arguments Note Author(s) See Also Examples

Description

Concatenate words or cycles together

Usage

1
2
3
4
5
6
## S3 method for class 'word'
c(...)
## S3 method for class 'cycle'
c(...)
## S3 method for class 'permutation'
rep(x, ...)

Arguments

...

In the methods for c(), objects to be concatenated. Must all be of the same type: either all word, or all cycle

x

In the method for rep(), a permutation object

Note

The methods for c() do not attempt to detect which type (word or cycle) you want as conversion is expensive.

Function rep.permutation() behaves like base::rep() and takes the same arguments, eg times and each.

Author(s)

Robin K. S. Hankin

See Also

size

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
x <- as.cycle(1:5)
y <- cycle(list(list(1:4,8:9),list(1:2)))


# concatenate cycles:
c(x,y)

# concatenate words:
c(rperm(5,3),rperm(6,9))   # size adjusted to maximum size of args


# repeat words:
rep(x, times=3)

permutations documentation built on Nov. 13, 2020, 1:14 a.m.