-
Notifications
You must be signed in to change notification settings - Fork 0
/
Remover.R
40 lines (30 loc) · 1.14 KB
/
Remover.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
removeTeamEvents <- function(db) {
ind_Dusseldorf <- grep("^World Team Cup", db$tourney_name)
if (length(ind_Dusseldorf)>0)
db <- db[-ind_Dusseldorf, ]
ind_Dusseldorf <- grep("^World Team Championship", db$tourney_name)
if (length(ind_Dusseldorf)>0)
db <- db[-ind_Dusseldorf, ]
ind_Dusseldorf <- grep("^WCT Aetna World Cup", db$tourney_name)
if (length(ind_Dusseldorf)>0)
db <- db[-ind_Dusseldorf, ]
ind_davis <- grep("^Davis Cup", db$tourney_name)
if (length(ind_davis)>0)
db <- db[-ind_davis, ]
ind_Laver <- grep("^Laver Cup", db$tourney_name)
if (length(ind_Laver)>0)
db <- db[-ind_Laver, ]
ind_Nations_Cup <- grep("^Nations Cup", db$tourney_name)
if (length(ind_Nations_Cup)>0)
db <- db[-ind_Nations_Cup, ]
ind_ATP_Cup <- grep("^ATP Cup", db$tourney_name)
if (length(ind_ATP_Cup)>0)
db <- db[-ind_ATP_Cup, ]
ind_Fed_Cup <- grep("^Fed Cup", db$tourney_name)
if (length(ind_Fed_Cup)>0)
db <- db[-ind_Fed_Cup, ]
ind_Next_Gen_Finals <- grep("^Next Gen Finals", db$tourney_name)
if (length(ind_Next_Gen_Finals)>0)
db <- db[-ind_Next_Gen_Finals, ]
return(db)
}