This function powers computing Head-to-Head values (both long and matrix).
get_matchups(cr_data)
A widecr for games with two players.
Competition results ready for as_longcr()
.
get_matchups()
returns a tibble of all
matchups (pairs of players from one game) actually present in cr_data
(including matchups of players with themselves).
It has following columns:
game
- game identifier of matchup.
player1
- identifier of first player in matchup.
score1
- score of the first player in matchup.
player2
- identifier of second player in matchup.
score2
- score of the second player in matchup.
Important notes:
Matchups are not symmetrical: matchup "player1"-"player2" is considered different from "player2"-"player1" in order to except more advanced, not symmetrical Head-to-Head values.
Missing values in player
column after conversion to longcr
are treated
as separate players. It allows operating with games where multiple players'
identifiers are not known. However, when computing Head-to-Head values they
treated as single player.
Long format of Head-to-Head values.
Matrix format of Head-to-Head values.