Learn R Programming

squashinformr (version 0.2.6)

get_rankings: Get the most recent PSA rankings from SquashInfo

Description

Given a competition category, get_rankings() returns the most recent PSA rankings table.

Usage

get_rankings(top = NULL, category = NULL)

Arguments

top

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

category

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

Value

Tibble containing the player rank, previous month's rank, name, highest ranking achieved, date of highest ranking, nationality, and competition category.

References

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

Examples

Run this code
# NOT RUN {
## Get the top 10 ranked men's singles players
get_rankings(top = 10, category = "mens")

## Get the top 10 ranked women's singles players
# }
# NOT RUN {
get_rankings(top = 20, category = "womens")
# }
# NOT RUN {
## Get the top 20 players in both men's and women's singles competitions
# }
# NOT RUN {
get_rankings(top = 20, category = "both")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab