TimStats commited on
Commit
0954c80
·
verified ·
1 Parent(s): 06288e3

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +3 -3
app.R CHANGED
@@ -478,7 +478,7 @@ calculate_timstuff <- function(game) {
478
  return(game_result)
479
  }
480
  summary_table <- function(game) {
481
- game <- calculatetimstuffall(game)
482
 
483
  if("TimStuff" %in% colnames(game)) {
484
  game <- game %>%
@@ -674,10 +674,10 @@ server <- function(input, output, session) {
674
  req(input$update1, game_data())
675
  game <- game_data() %>% filter(`Pitcher Name` == input$pitcher)# %>%
676
  # mutate(
677
- # pitch_name = case_when(
 
678
  # pitch_name %in% c("Fastball", "FourSeamFastBall") ~ "Four-Seam",
679
  # pitch_name %in% c("TwoSeamFastBall", "OneSeamFastBall", "Sinker") ~ "Sinker",
680
- # pitch_name %in% c("ChangeUp") ~ "Changeup",
681
  # pitch_name %in% c("KnuckleCurve") ~ "Knuckle Curve",
682
  # pitch_name %in% c("CutFastBall") ~ "Cutter",
683
  # TRUE ~ pitch_name
 
478
  return(game_result)
479
  }
480
  summary_table <- function(game) {
481
+ game <- calculate_timstuff(game)
482
 
483
  if("TimStuff" %in% colnames(game)) {
484
  game <- game %>%
 
674
  req(input$update1, game_data())
675
  game <- game_data() %>% filter(`Pitcher Name` == input$pitcher)# %>%
676
  # mutate(
677
+ # pitch pitch_name %in% c("ChangeUp") ~ "Changeup",
678
+ # _name = case_when(
679
  # pitch_name %in% c("Fastball", "FourSeamFastBall") ~ "Four-Seam",
680
  # pitch_name %in% c("TwoSeamFastBall", "OneSeamFastBall", "Sinker") ~ "Sinker",
 
681
  # pitch_name %in% c("KnuckleCurve") ~ "Knuckle Curve",
682
  # pitch_name %in% c("CutFastBall") ~ "Cutter",
683
  # TRUE ~ pitch_name