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

permutation

Class ser_permutation – A Collection of Permutation Vectors for Seriation


Description

The class ser_permutation is a collection of permutation vectors (see class ser_permutation_vector), one for each dimension (mode) of the data to be permuted.

Usage

## constructor
ser_permutation(x, ...)

Arguments

x

an object of class ser_permutation_vector or any object which can be converted into a object of class ser_permutation (e.g. an integer vector).

...

permutation vectors for further dimensions

Details

The basic functions print, "[", "[[" and c are provided.

Value

An object of class ser_permutation.

Author(s)

Michael Hahsler

See Also

Examples

o <- ser_permutation(1:5, 10:1)
o

## length (number of dimensions)
length(o)

## get permutation vector for 2nd dimension
get_order(o, 2)

## reverse dimensions
o[2:1]

## combine
o <- c(o, ser_permutation(1:15))
o

## get an individual permutation
o[[2]]

## reverse the order of a permutation
o[[2]] <- rev(o[[2]])
get_order(o,2)

seriation

Infrastructure for Ordering Objects Using Seriation

v1.2-9
GPL-3
Authors
Michael Hahsler [aut, cre, cph], Christian Buchta [aut, cph], Kurt Hornik [aut, cph], Fionn Murtagh [ctb, cph], Michael Brusco [ctb, cph], Stephanie Stahl [ctb, cph], Hans-Friedrich Koehn [ctb, cph]
Initial release
2020-09-29

We don't support your browser anymore

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