filter_tourney: Filter Tennis Data on Tournament

Description Usage Arguments Value Examples

View source: R/tourneys.R

Description

Select one or more tournaments from x.

Usage

1

Arguments

x

A data frame from the tennis package.

...

Either the name or the id of the tournament(s). Might be used together. The ids are formed by the last three characters of tourney_id.

x

A data frame from the tennis package.

...

A vector with the ids and/or tournaments.

Value

A subset of x with the matches of the requested tournaments.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# find all the Grand Slam matches in 2016
library(dplyr)
atp_matches %>% filter_time(2016) %>%
    filter_tourney("Australian Open", "Roland Garros", "Wimbledon", "US Open")

find all the Grand Slam matches from 2010 to 2015
atp_matches %>% filter_time(2010, 2015) %>%
   filter_tourney(520, 540, 560, 580)

find all matches at Sydney, Brisbane and Australian Open
atp_matches %>% filter_tourney("Sydney", "Brisbane", 580)

EdwinTh/tennis documentation built on Jan. 13, 2020, 2:38 p.m.