Skip to contents

Returns a player's PageRank from the most recent snapshot BEFORE the given date.

Usage

get_pagerank_as_of(player_id, role, match_date, format, conn, gender = NULL)

Arguments

player_id

Character. The player ID to look up.

role

Character. "batter" or "bowler".

match_date

Date or character. The match date.

format

Character. Match format: "t20", "odi", or "test".

conn

DBI connection to the database.

gender

Character. Gender category. Default NULL.

Value

List with pagerank, percentile, quality_tier, snapshot_date, or NULL if no snapshot exists.

Examples

if (FALSE) { # \dontrun{
conn <- get_db_connection(read_only = TRUE)
result <- get_pagerank_as_of("SPSmith", "batter", "2024-03-01", "test", conn)
DBI::dbDisconnect(conn, shutdown = TRUE)
} # }