-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal.R
33 lines (25 loc) · 1017 Bytes
/
global.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
library(data.table)
#install.packages("shinydashboard")
library(rsconnect)
library(shinydashboard)
library(shiny)
library(stringr)
library(dplyr)
library(tidyverse)
library(ggplot2)
library(tidyr)
library(stringi)
source('Helpers/MatchDataG.R')
source('Helpers/DerivativesG.R')
source('Helpers/CommonFunctions.R')
source('Helpers/PointDataG.R')
source('Helpers/NewbsVsVetsG.R')
source('Helpers/TournamentPerformanceG.R')
# read data
menPoints = read_csv('Tennis/menPoints.csv')
womenPoints = read_csv('Tennis/womenPoints.csv')
points = full_join(menPoints, womenPoints) %>% mutate(winner = ifelse(PtWinner==1,player1,player2), loser = ifelse(PtWinner==1,player2,player1))
finalPoint = points %>% group_by(match_id) %>% filter(Pt == max(Pt)) %>% arrange(date)
finalPoint
#radioButtons = radioButtons('gender', 'Player Gender to examine:', choices = c('M','W','Both'), inline=TRUE, selected = 'Both')
#playersC = selectInput('chosenPlayer', label = "Choose a player", choices = tournamentWinsFiltered$winner)