Learn R Programming

PerMallows (version 1.8)

permutation2decomposition: Get the decomposition vector

Description

Given a permutation and a distance name generate the decomposition vector

Usage

permutation2decomposition(perm, dist.name = "kendall")

Arguments

perm
the permutation
dist.name
optional the name of the distance. One of: kendall (default), cayley, hamming

Value

  • The distance decomposition vector of the given permutation and distance

Examples

Run this code
permutation2decomposition(c(1,2,4,3,5), "kendall")
permutation2decomposition(c(1,2,4,3,5), "cayley")
permutation2decomposition(c(1,2,4,3,5), "hamming")

Run the code above in your browser using DataLab