Query match data with filters.
Usage
query_matches(
match_type = NULL,
season = NULL,
team = NULL,
venue = NULL,
date_range = NULL,
source = c("local", "remote"),
db_path = NULL
)Arguments
- match_type
Character. Filter by match type (e.g., "odi", "t20", "test")
- season
Character or numeric. Filter by season/year
- team
Character. Filter matches involving this team
- venue
Character. Filter by venue/stadium
- date_range
Date vector of length 2. c(start_date, end_date)
- source
Character. "local" (default) uses local DuckDB. "remote" queries GitHub releases via fast download.
- db_path
Character. Database path (only used when source = "local").
Examples
if (FALSE) { # \dontrun{
# Get all ODI matches in 2023
odis_2023 <- query_matches(match_type = "odi", season = "2023")
# Get all India matches
india_matches <- query_matches(team = "India")
# Get recent T20Is
recent_t20 <- query_matches(
match_type = "t20",
date_range = c(as.Date("2024-01-01"), as.Date("2024-12-31"))
)
# Query from remote (no local install needed)
remote_matches <- query_matches(match_type = "T20", source = "remote")
} # }
