round_robin: Generate a round robin tournament schedule

Description Usage Arguments Value Examples

View source: R/roundRobin.R

Description

Given a list of n team names, generate a program of n-1 Rounds where each team plays each other team precisely once. If n is odd the teams are augmented by a dummy team <Bye>.

Usage

1
2
3
4
5
6
7
round_robin(teams, alphabetical = TRUE, reorder = FALSE)

## S3 method for class 'round_robin'
print(x, ...)

## S3 method for class 'round_robin'
summary(object, type = c("venue", "travel"), ...)

Arguments

teams

Either an interger specifing the number of teams, or a character string vector giving their names

alphabetical

logical: should the teams be alphabetically ordered, if necessary?

reorder

logical: within each round should the games be listed in alphabetical order of the "Home" team?

Value

A 3-dimensional (n/2 x 2 x (n-1)) array giving the entire tournament

Examples

1
2
3
(Season2019 <- round_robin(NRL))
summary(Season2019)
summary(Season2019, "travel")

BillVenables/WWRCourse documentation built on Jan. 31, 2021, 4:22 p.m.