get_matchups {comperes} | R Documentation |
Get matchups from competition results
Description
This function powers computing Head-to-Head values (both long and matrix).
Usage
get_matchups(cr_data)
Arguments
cr_data |
Competition results ready for |
Details
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 tolongcr
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.
Value
A widecr for games with two players.
See Also
Long format of Head-to-Head values.
Matrix format of Head-to-Head values.
Examples
get_matchups(ncaa2005)