Learn R Programming

rankdist (version 0.3.1)

RankData-class: RankData Class

Description

A S4 class to represent ranking data It is well understood that the ranking representation and ordering representation of ranking data can easily get confused. I thus use a S4 class to store all the information about the ranking data. This can avoid unnessary confusions.

Arguments

See Also

RankInit, RankControl

Examples

Run this code
# creating a random rank data set
rankmat = replicate(10,sample(1:52,52), simplify = "array")
ordermat = OrderingToRanking(rankmat)
countvec = sample(1:52,52,replace=TRUE)
rankdat = new("RankData",nobj=52,nobs=sum(countvec),ndistinct=10,
     ranking=rankmat,ordering=ordermat,count=countvec)

Run the code above in your browser using DataLab