get_matchup | R Documentation |
Given the full names or ranks of players, and the competition category, get_matchup()
returns recent matchup data for PSA ranked players.
get_matchup( player_1 = NULL, player_2 = NULL, ranks = NULL, category = NULL, tidy = FALSE, match_spread = FALSE )
player_1 |
character string of the first player's name. |
player_2 |
character string of the second player's name. |
ranks |
integers indicating the rank of the PSA players to return. |
category |
character string indicating the competition category. Must be one of "mens" or "womens". |
tidy |
logical indicating whether to organize results according to tidy principles. |
match_spread |
logical indicating whether to only return match spread statistics. |
Tibble containing each player's rank, name, total matches played, number of matches won, the match results spread (relative to player 1), the average match time, the number of games played, the number of games won, average point advantage in a won game, the average point difference in final scores, the number of tie-break wins, and the percentage of games that go to a tie-breaker.
This function only returns data from players ranked in the most recent PSA rankings table for Men's and Women's singles competitions.
http://www.squashinfo.com/rankings/men
http://www.squashinfo.com/rankings/women
## Get tidy matchup data for Mohamed Elshorbagy vs Ali Farag get_matchup(player_1 = "Mohamed Elshorbagy", player_2 = "Ali Farag", category = "mens", tidy = TRUE) ## Get non-tidy matchup data for Nouran Gohar vs Nour El Sherbini get_matchup("Nouran Gohar", "Nour El Sherbini", category = "womens", tidy = FALSE) ## Get tidy match spread data for Paul Coll and Ali Farag get_matchup("Paul Coll", "Ali Farag", category = "mens", tidy = TRUE, match_spread = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.