permutations (version 1.0-0)

length: Various vector-like utilities for permutation objects.

Description

Various vector-like utilities for permutation objects such as length, names(), etc

Usage

"length"(x) "length"(x) <- value "names"(x) "names"(x) <- value

Arguments

x
permutation object
value
In function names<-.word(), the new names

Details

These functions have methods only for word objects; cycle objects use the methods for lists. It is easy to confuse the length of a permutation with its size.

It is not possible to set the length of a permutation; this is more trouble than it is worth.

See Also

size

Examples

Run this code
names(megaminx) <- NULL   #makes it print more nicely.

x <- rperm(9,5)
names(x) <- letters[1:9]

Run the code above in your browser using DataLab