Learn R Programming

squashinformr (version 0.2.1)

get_player_rankings_history: Get a player's PSA ranking history from SquashInfo

Description

Given a player name or rank, and a competition category, get_player_rankings_history() returns a tidy version of the PSA rankings history table for that player(s).

Usage

get_player_rankings_history(player = NULL, rank = NULL, category = NULL)

Arguments

player

character string of player name(s).

rank

integer indicating the rank of the PSA player(s) to return.

category

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

Value

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

References

http://www.squashinfo.com/rankings/men http://www.squashinfo.com/rankings/women

Examples

Run this code
# NOT RUN {
## Get the rankings history for the top two men's singles players
# }
# NOT RUN {
top_two <- get_player_rankings_history(rank = 1:2, category = "mens")
# }
# NOT RUN {
## Get the rankings history for the top three women's singles players
# }
# NOT RUN {
top_three <- get_player_rankings_history(rank = 1:3, category = "womens")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab