Update app.R
Browse files
app.R
CHANGED
|
@@ -478,7 +478,7 @@ calculate_timstuff <- function(game) {
|
|
| 478 |
return(game_result)
|
| 479 |
}
|
| 480 |
summary_table <- function(game) {
|
| 481 |
-
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
|
|
|
|
| 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
|