Functions to compute Head-to-Head values in matrix pair-value format.
1 2 3
Competition results ready for
Name-value pairs of Head-to-Head functions (see Details).
A single value to use instead of
Data frame in long format of Head-to-Head values.
String name for column with Head-to-Head value.
h2h_mat() computes Head-to-Head values in
matrix format. It allows multiple Head-to-Head
... but only first (if present) will be used. Basically, it
uses supplied function to compute long format of Head-to-Head values and then
transforms it naturally to matrix, filling missing values
to_h2h_mat() takes object of h2h_long structure and converts it into
h2h_mat using column with name
value for values and filling data for
implicitly missing (not explicitly provided in
tbl) player pairs with
NULL it takes first non-player column. If there is no
such column, it will use vector of dummy values (
An object of class
h2h_mat which is a matrix with row names
indicating first player in matchup, col names - second and values -
Head-to-Head value is a summary statistic of direct confrontation between two
players. It is assumed that this value can be computed based only on the
players' matchups. In other words, every game is converted
into series of "subgames" between ordered pairs of players (including
selfplay) which is stored as widecr object. After that, summary of item,
defined by columns
player2, is computed using
That said, name-value pairs of Head-to-Head functions should be defined as
summarise_item() applied to data with columns
Long format of Head-to-Head values.
Common Head-to-Head functions.
1 2 3 4 5 6 7 8 9
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.