Learn R Programming

squashinformr (version 0.2.6)

get_players: Get PSA Squash Player Data from SquashInfo

Description

Given the rank(s) and competition category, get_players() returns profile data of ranked players in PSA World Tour competitions.

Usage

get_players(top = NULL, rank = NULL, category = NULL)

Arguments

top

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

rank

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

category

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

Value

Tibble containing first name, last name, age, gender, birthplace, nationality, residence, height in cm, weight in kg, plays (handedness), racket brand, year of joining PSA, university, and club.

References

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

Examples

Run this code
# NOT RUN {
## Return the top 5 ranked players from the Women's PSA rankings
# }
# NOT RUN {
get_players(top = 5, category = "womens")
# }
# NOT RUN {
## Return the 5th ranked player from both Men's and Women's PSA rankings
# }
# NOT RUN {
get_players(rank = 5, category = "both")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab