get_matchups: Get matchups from competition results

View source: R/utils.R

get_matchupsR 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 as_longcr().

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 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.

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)

comperes documentation built on March 7, 2023, 7:02 p.m.