Learn R Programming

seriation (version 1.0-12)

ser_permutation_vector: Class ser_permutation_vector -- A single permutation vector for seriation

Description

The class ser_permutation_vector represents a single permutation vector.

Usage

## constructor
ser_permutation_vector(x, method = NULL)

Arguments

x
an object which contains a permutation vector (currently an integer vector or an object of class hclust)
method
a string representing the method used to obtain the permutation vector

Details

A permutation vector is a permutation of the integer vector $<1, 2,="" ...,="" n="">$, were $n$ is the number of objects. For example, the permutation vector $<3, 2="" 1,="">$ indicates that in first position is the object with index 3 then the object with index 1 and finally the object with index 2.

ser_permutation_vector objects are usually packed into a ser_permutation object which is a collection of $k$ permutation vectors for $k$-mode data.

The constructor ser_permutation_vector checks if the permutation vector is valid (i.e. if all integers occur exactly once).

See Also

ser_permutation

Examples

Run this code
p <- ser_permutation_vector(1:10, "identity")
p

## some methods
length(p)
get_order(p)
get_method(p)

r <- rev(p)
r
get_order(r)

Run the code above in your browser using DataLab