roundrobin: Round-Robin Schedule

View source: R/roundrobin.R

roundrobinR Documentation

Round-Robin Schedule

Description

Generates round-robin schedules for a certain number of teams and rounds.

Usage

roundrobin(teams, rounds = teams - (teams %% 2 == 0),
           method = c("yahoo", "loop", "recursive"))

Arguments

teams

integer (length 1 vector). The number of teams to generate a schedule for.

rounds

integer (length 1 vector). The number of rounds to generate a schedule for. Defaults to teams - (teams %% 2 == 0) for a true round-robin.

method

character (length 1 vector). See details.

Details

Method "yahoo" uses the same format Yahoo! uses for its fantasy sports applications.

Method "loop" uses a simple algorithm found on Wikipedia.

Method "recursive" is for tournaments with teams = 2 ** k.

Value

Integer matrix with each column corresponding to a team and each row corresponding to the other teams that teams play for the round. NA represents a BYE.


graywh/r-gmisc documentation built on April 19, 2023, 1:42 p.m.