Spaces:
Running
Running
Update app.R
Browse files
app.R
CHANGED
|
@@ -2237,12 +2237,20 @@ catcher_create_catcher_pdf <- function(game_df, catcher_name, output_file, bio_d
|
|
| 2237 |
`CCU Game +/-` = sum(StolenStrike, na.rm = TRUE) - sum(StrikeLost, na.rm = TRUE),
|
| 2238 |
.groups = "drop")
|
| 2239 |
|
| 2240 |
-
|
| 2241 |
-
|
| 2242 |
-
|
| 2243 |
-
|
| 2244 |
-
|
| 2245 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2246 |
|
| 2247 |
pitch_log <- catcher_df %>%
|
| 2248 |
filter(StolenStrike == 1 | StrikeLost == 1) %>%
|
|
|
|
| 2237 |
`CCU Game +/-` = sum(StolenStrike, na.rm = TRUE) - sum(StrikeLost, na.rm = TRUE),
|
| 2238 |
.groups = "drop")
|
| 2239 |
|
| 2240 |
+
ccu_pitcher_team <- game_df %>%
|
| 2241 |
+
filter(Catcher == catcher_name) %>%
|
| 2242 |
+
pull(PitcherTeam) %>%
|
| 2243 |
+
na.omit() %>%
|
| 2244 |
+
{ names(sort(table(.), decreasing=TRUE))[1] }
|
| 2245 |
+
|
| 2246 |
+
opp_receiving_stats <- catcher_df %>%
|
| 2247 |
+
filter(PitcherTeam == ccu_pitcher_team) %>% # CCU pitching = opponent batting
|
| 2248 |
+
summarise(
|
| 2249 |
+
`Opp Strikes Stolen` = sum(StolenStrike, na.rm = TRUE),
|
| 2250 |
+
`Opp Strikes Lost` = sum(StrikeLost, na.rm = TRUE),
|
| 2251 |
+
`Opp Game +/-` = sum(StolenStrike, na.rm = TRUE) - sum(StrikeLost, na.rm = TRUE),
|
| 2252 |
+
.groups = "drop"
|
| 2253 |
+
)
|
| 2254 |
|
| 2255 |
pitch_log <- catcher_df %>%
|
| 2256 |
filter(StolenStrike == 1 | StrikeLost == 1) %>%
|