Learn R Programming

squashinformr (version 0.1.4)

get_historical_rankings: Get historical PSA rankings from SquashInfo

Description

Given a year, abbreviated month, competition category, and number of top players, get_historical_rankings() returns the corresponding historical PSA rankings table.

Usage

get_historical_rankings(year = NULL, month = NULL, category = NULL, top = NULL)

Arguments

year

integer indicating the ranking year

month

three letter abbreviation of ranking month

category

character string indicating the competition category. Must be one of "both", "mens", or "womens".

top

integer indicating the number of top PSA players by rank to return.

Value

Tibble containing the ranking year, ranking month, exact date, rank, player name, and player current rank.

References

http://www.squashinfo.com/players

Examples

Run this code
# NOT RUN {
## Who were the top 5 players in both men's and women's singles in January 2019?
# }
# NOT RUN {
top5 <- get_historical_rankings(2019, "Jan", "both", 5)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab