Learn R Programming

bracketeer (version 0.1.1)

result: Fluent tournament result entry helper

Description

Convenience wrapper around set_result() for tournament workflows.

Usage

result(tournament, stage, match, score, overwrite = FALSE, auto_advance = NULL)

Value

Updated tournament object.

Arguments

tournament

A tournament object.

stage

Stage identifier containing the match.

match

Match identifier inside stage.

score

Numeric vector score payload. For a single match, pass c(score1, score2).

overwrite

Logical; forwards to set_result(..., overwrite = ...).

auto_advance

Optional logical override. If NULL, defaults to the tournament's auto_advance setting when present.

Examples

Run this code
teams <- c("A", "B", "C", "D")
trn <- tournament(teams) |>
  round_robin("groups")

# Enter a single result
trn <- result(trn, "groups", match = 1, score = c(2, 1))

Run the code above in your browser using DataLab