Look up a player by name or ID and get their basic info and current skill indices.
Usage
get_player(
name_or_id,
format = NULL,
source = c("local", "remote"),
db_path = NULL
)Arguments
- name_or_id
Character. Player name (partial match supported) or player ID.
- format
Character. Format for skill indices: "t20", "odi", or "test". If NULL, returns latest skills across 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
A bouncer_player object containing:
player_id - Unique player identifier
player_name - Full name
country - Country/team
batting_style - Left/right handed
bowling_style - Bowling type
skills - Current skill indices (if available)
See also
compare_players to compare two players side-by-side,
analyze_player for detailed performance analysis
Examples
if (FALSE) { # \dontrun{
# Look up by name (partial match)
kohli <- get_player("Virat Kohli")
kohli <- get_player("Kohli") # Also works
# Get T20-specific skills
kohli_t20 <- get_player("Virat Kohli", format = "t20")
# Look up from remote (no local install needed)
kohli_remote <- get_player("Virat Kohli", format = "t20", source = "remote")
# Print shows formatted output
print(kohli)
} # }
