get_player_recent_games: Get a player's recent games from SquashInfo

View source: R/get_player_recent_.R

get_player_recent_gamesR Documentation

Get a player's recent games from SquashInfo

Description

Given the full name or rank of a player and the competition category, get_player_recent_games() returns recent game data for PSA ranked players.

Usage

get_player_recent_games(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, name, opponent, points won, points lost, game result, tournament round, event, PSA designation, and event location.

Note

This function only returns data from players ranked in the most recent PSA rankings table for Men's and Women's singles competitions.

References

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

Examples


## Get Mohamed Elshorbagy's most recent game data
get_player_recent_games(player = "Mohamed Elshorbagy", category = "mens")

## Get Nour El Tayeb's recent game data
get_player_recent_games("El Tayeb", category = "womens")

## Get recent game data from the top two players in both Men's and Women's competitions
get_player_recent_games(rank = 1:2, category = "both")


squashinformr documentation built on May 10, 2022, 5:12 p.m.