Skip to contents

Retrieves a team's ELO rating as of a specific date.

Usage

get_team_elo(team_id, as_of_date, elo_type = "result", conn)

Arguments

team_id

Character. Team identifier/name

as_of_date

Date. Date to get ELO for (uses most recent before this date)

elo_type

Character. Type of ELO: "result", "roster_batting", "roster_bowling", or "roster_combined"

conn

DBI connection. Database connection

Value

Numeric. Team's ELO rating, or TEAM_ELO_START if no history

Examples

if (FALSE) { # \dontrun{
conn <- get_db_connection()
elo <- get_team_elo("Mumbai Indians", as.Date("2024-04-01"), "result", conn)
} # }