score: Create a 1/0/0.5 win "indicator"

View source: R/score.R

scoreR Documentation

Create a 1/0/0.5 win "indicator"

Description

Create a 1/0/0.5 win "indicator" based on two teams' scores, and test for "score-ness".

Usage

score(score.A, score.B)

is.score(x)

Arguments

score.A

Numeric; the score of the first team (whose wins are to be denoted by 1).

score.B

Numeric; the score of the second team (whose wins are to be denoted by 0).

x

An R object.

Value

For score, a vector containing 0, 1, and 0.5 (for ties). For is.score, TRUE or FALSE depending on whether all values of x are between 0 and 1 (inclusive).

See Also

score

Examples

score(12, 10)
score(10, 10)
score(10, 12)

eheinzen/elo documentation built on Oct. 11, 2023, 12:19 a.m.