Learn R Programming

squashinformr (version 0.2.6)

get_player_recent_results: Get a player's recent event results from SquashInfo

Description

Given the full name or rank of a player and the competition category, get_player_recent_results() returns the recent event results table for PSA ranked players.

Usage

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

Arguments

player

character string of player name.

rank

single integer or vector of integers 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 player rank, player name, player's seeding, round reached, event name, event date, event location, and event tour.

References

http://www.squashinfo.com/

Examples

Run this code
# NOT RUN {
## Get Mohamed Elshorbagy's most recent results data
# }
# NOT RUN {
get_player_recent_results(player = "Mohamed Elshorbagy", category = "mens")
# }
# NOT RUN {
## Get Nour El Tayeb's recent results data
# }
# NOT RUN {
get_player_recent_results("El Tayeb", category = "womens")
# }
# NOT RUN {
## Get recent results data from the top two players in both Men's and Women's competitions
# }
# NOT RUN {
get_player_recent_results(rank = 1:2, category = "both")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab