igroffman commited on
Commit
f8dd090
Β·
verified Β·
1 Parent(s): ccc530e

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +8 -8
app.R CHANGED
@@ -2500,6 +2500,14 @@ server <- function(input, output, session) {
2500
  processed_data()
2501
  })
2502
  }
 
 
 
 
 
 
 
 
2503
 
2504
  # ── Merge catcher notes into existing Notes column ──
2505
  notes <- catcher_notes_list()
@@ -2542,14 +2550,6 @@ server <- function(input, output, session) {
2542
  df$Notes[last_row] <- paste(existing, unmatched_str, sep = " | ")
2543
  }
2544
  }
2545
-
2546
- if (!is.null(input$download_team_filter) && input$download_team_filter != "all") {
2547
- if (input$download_team_filter == "coastal_pitchers" && "PitcherTeam" %in% names(df)) {
2548
- df <- df %>% filter(PitcherTeam == "COA_CHA")
2549
- } else if (input$download_team_filter == "coastal_hitters" && "BatterTeam" %in% names(df)) {
2550
- df <- df %>% filter(BatterTeam == "COA_CHA")
2551
- }
2552
- }
2553
 
2554
  return(df)
2555
  }
 
2500
  processed_data()
2501
  })
2502
  }
2503
+
2504
+ if (!is.null(input$download_team_filter) && input$download_team_filter != "all") {
2505
+ if (input$download_team_filter == "coastal_pitchers" && "PitcherTeam" %in% names(df)) {
2506
+ df <- df %>% filter(PitcherTeam == "COA_CHA")
2507
+ } else if (input$download_team_filter == "coastal_hitters" && "BatterTeam" %in% names(df)) {
2508
+ df <- df %>% filter(BatterTeam == "COA_CHA")
2509
+ }
2510
+ }
2511
 
2512
  # ── Merge catcher notes into existing Notes column ──
2513
  notes <- catcher_notes_list()
 
2550
  df$Notes[last_row] <- paste(existing, unmatched_str, sep = " | ")
2551
  }
2552
  }
 
 
 
 
 
 
 
 
2553
 
2554
  return(df)
2555
  }