labels: Transform a ranking into a ordering.

View source: R/labels.R

labelsR Documentation

Transform a ranking into a ordering.

Description

Given a ranking (or a matrix of rank data), transforms it into an ordering (or a ordering matrix)

Usage

labels(x, m, label = 1:m, labs)

Arguments

x

a ranking, or a n by m data matrix in which there are n judges ranking m objects

m

the number of objects

label

optional: the name of the objects

labs

labs = 1 displays the names of the objects if there is argument "label", otherwise displays the permutation of first m integer. labs = 2 is to be used only if the argument "label" is not defined. In such a case it displays the permutation of the first m letters

Details

This function is deprecated and it will be removed in the next release of the package. Use function 'rank2order' instead.

Value

the ordering

Author(s)

Sonia Amodio sonia.amodio@unina.it

See Also

rank2order

Examples

data(Idea)
TR=tabulaterows(Idea)
Ord=labels(TR$X,ncol(Idea),colnames(Idea),labs=1)
Ord2=labels(TR$X,ncol(Idea),labs=2)
cbind(Ord,TR$Wk)
cbind(Ord2,TR$Wk)


ConsRank documentation built on May 29, 2024, 7:55 a.m.