View source: R/rank_binomial.R
set_binomialfreq | R Documentation |
Binary comparisons from a ranking object. Ties are not taken into account, then they are added as NA's.
set_binomialfreq(object, drop.null = FALSE, disaggregate = FALSE)
object |
an object of class |
drop.null |
logical, an optional argument to remove null contests |
disaggregate |
logical, if |
A data.frame with binary rank of pairwise contests:
player1 |
a factor with n levels for the first player in the contests |
player2 |
a factor with n levels (same as player1) for the second player in the contests |
win1 |
number of times player1 wins against player2 |
win2 |
number of times player2 wins against player1 |
Kauê de Sousa
Turner H. & Firth D. (2012). Journal of Statistical Software, 48(9), 1–21. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.18637/jss.v048.i09")}
Other rank functions:
rank_numeric()
,
rank_tricot()
,
set_paircomp()
library("PlackettLuce")
R = matrix(c(1, 2, 0, 0,
4, 1, 2, 3,
2, 4, 3, 1,
1, 2, 3, 0,
2, 1, 1, 0,
1, 0, 3, 2), nrow = 6, byrow = TRUE)
colnames(R) = c("apple", "banana", "orange", "pear")
R = as.rankings(R)
set_binomialfreq(R)
set_binomialfreq(R, disaggregate = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.