tests/rankEntropy.R

# Test the C implementation of ranking entropy (about 40x speed up)
library(smaa)

data <- dget('rankEntropy.txt')
N <- dim(data$ranks)[1]

#counts <- .Call(smaa_countRankings, t(data$ranks))
#stopifnot(all.equal(counts[counts > 0], data$counts))

stopifnot(all.equal(smaa.entropy.ranking(data$ranks), data$entropy))

Try the smaa package in your browser

Any scripts or data that you put into this service are public.

smaa documentation built on April 28, 2023, 5:07 p.m.