Title: | Relative Placement Algorithm |
---|---|
Description: | Implementation of the relative placement algorithm widely used in the scoring of Lindy Hop and West Coast Swing dance contests. |
Authors: | Daphna Harel [cre, aut], Yoav Bergner [aut] |
Maintainer: | Daphna Harel <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.0 |
Built: | 2024-11-09 02:50:48 UTC |
Source: | https://github.com/daphnaharel/rpscoring |
Function to obtain the matrix of number of 1-1s, 1-2s, and so on.
dashmatrix(data)
dashmatrix(data)
data |
dataset with competitors as rows and judges as columns |
A matrix:
dashmatrix |
matrix of number of placements |
dashmatrix(testdata)
dashmatrix(testdata)
Function to rank contestants
rankContestants(data)
rankContestants(data)
data |
dataset with competitors as rows and judges as columns |
A vector:
finalranking |
final rankings of the competitors |
rankContestants(testdata)
rankContestants(testdata)
Function to resolve ties between competitors.
resolveTies(data, contestants, column)
resolveTies(data, contestants, column)
data |
dataset with competitors as rows and judges as columns |
contestants |
vector with which contestant numbers to resolve ties for |
column |
column of the dash matrix to begin with |
A list:
winnerfound |
method by which winner was found |
winner |
vector with whom the winners were |
resolveTies(testdata, c(1,2), 1)
resolveTies(testdata, c(1,2), 1)
This synthetic dataset represents the placements of n contestants (rows) by J judges (columns).
testdata
testdata
A data frame with 8 contestants (rows) and 5 judges (variables):
rankings for Judge 1
rankings for Judge 1
rankings for Judge 1
rankings for Judge 1
rankings for Judge 1