Get historical head-to-head record between two teams.
Usage
head_to_head(
team1,
team2,
match_type = NULL,
source = c("local", "remote"),
db_path = NULL
)Arguments
- team1
Character. First team name.
- team2
Character. Second team name.
- match_type
Character. Filter by match type: "T20", "ODI", "Test", "IT20", "MDM", or NULL for all formats.
- source
Character. "local" (default) uses local DuckDB. "remote" queries GitHub releases via fast download.
- db_path
Character. Database path (only used when source = "local").
Value
Data frame with head-to-head record:
matches, team1_wins, team2_wins, draws/ties/no_results
team1_win_pct, team2_win_pct
recent results
Examples
if (FALSE) { # \dontrun{
# Overall head-to-head
head_to_head("India", "Australia")
# T20 head-to-head
head_to_head("India", "Pakistan", match_type = "T20")
# Test match head-to-head
head_to_head("England", "Australia", match_type = "Test")
# Remote head-to-head (no local install needed)
head_to_head("India", "Pakistan", source = "remote")
} # }
