Sachin Shahi
May 24, 2016
For more details on authoring R presentations click the Help button on the toolbar.
Chelsea have been performing well in the Premier League this season. They are 3 points ahead of team in second position of the leagure with just 11 games left.
Football fans would be able to see easily how many points Chelsea will end up on by predicting the results of their remaining games.
library(shiny)
radioButtons("southampton", "16/02 - Chelsea vs Southampton",
c("Chelsea Win" = "win",
"Draw" = "draw",
"Arsenal Loss" = "loss"), inline=TRUE)
output$lTable <- renderDataTable(leagueTable, options=list(paging = FALSE,
searching = FALSE))
southampton <- reactive({
switch(input$southampton, "win" = 3,
"draw" = 1,
"loss" = 0)
})
southampton <- 3; hull <- 1; stoke <- 3; qpr <- 3; manutd <- 0; chelsea <- 1;
leicester <- 3; crystalpalace <- 3; liverpool <- 1; westbrom <- 3; sunderland <- 3
totPoints <- 60 + southampton + hull + stoke + qpr + manutd + chelsea + leicester +
crystalpalace + liverpool + westbrom + sunderland; totPoints
[1] 84
southamptonNeed <- 64 + totPoints - 28; southamptonNeed
[1] 120