roundrobin: Create a match schedule

Description Usage Arguments Details Value References Examples

View source: R/roundrobin.R

Description

Create a match schedule according to the DFB's (German Soccer Association) 'harmonischer Schlüssel-Plan 1-L' which is used as a blueprint for german football leagues.

Usage

1
2
roundrobin(teamvector, second_round = TRUE, match_free = TRUE,
  randomize = TRUE, seed)

Arguments

teamvector

A character vector of teams.

second_round

A logical value, indicating whether a second round with changed home and away team should be planned. Defaults to TRUE.

match_free

A logical value, indicating whether match free teams should be deleted from the schedule. Defaults to TRUE.

randomize

A logical value, indicating whether the team vector should be ordered randomly. Defaults to TRUE.

seed

A user defined integer to replicate the randomization process if randomize = TRUE.

Details

The applicability is currently restricted to a minimum of five teams.

Value

A data frame containing a match schedule including variables for matchday, home and away team.

References

https://portal.dfbnet.org/fileadmin/content/downloads/faq/211111_SZ_DFBnet_extern_mit_Gegenueberstellung4.pdf

Examples

1
2
3
4
5
6
7
require("engsoccerdata")
#get german Bundesliga teams from 1986
germany_1986 <- unique(engsoccerdata::germany[engsoccerdata::germany$Season==1986,"home"])
#replicable schedule
roundrobin(teamvector=germany_1986,second_round=TRUE,match_free=TRUE,randomize=TRUE,seed=1234)
#non replicable schedule
roundrobin(teamvector=germany_1986,second_round=TRUE,match_free=TRUE,randomize=TRUE)

TouRnament documentation built on Oct. 5, 2019, 9:05 a.m.