Update app.R
Browse files
app.R
CHANGED
|
@@ -233,7 +233,8 @@ server <- function(input, output) {
|
|
| 233 |
summarise(
|
| 234 |
Pitches = n(),
|
| 235 |
#BBE = sum(BBE,na.rm = TRUE),
|
| 236 |
-
"Whiff%" = mean(Whiff,na.rm = TRUE),
|
|
|
|
| 237 |
"CSW%" = mean(CSW,na.rm = TRUE),
|
| 238 |
"Zone%" = mean(Zone,na.rm = TRUE),
|
| 239 |
"ZCon%" = mean(Contact[Zone == TRUE & Swing == TRUE],na.rm = TRUE),
|
|
@@ -276,7 +277,8 @@ server <- function(input, output) {
|
|
| 276 |
Pitches = n(),
|
| 277 |
# BBE = sum(BBE,na.rm = TRUE),
|
| 278 |
"Usage%" = n() / nrow(.), # Added Usage% calculation
|
| 279 |
-
"Whiff%" = mean(Whiff
|
|
|
|
| 280 |
"CSW%" = mean(CSW, na.rm = TRUE),
|
| 281 |
"Zone%" = mean(Zone, na.rm = TRUE),
|
| 282 |
"ZCon%" = mean(Contact[Zone == TRUE & Swing == TRUE], na.rm = TRUE),
|
|
@@ -327,7 +329,8 @@ server <- function(input, output) {
|
|
| 327 |
Pitches = n(),
|
| 328 |
#BBE = sum(BBE,na.rm = TRUE),
|
| 329 |
"Usage%" = (n() / first(total_side)),
|
| 330 |
-
"Whiff%" = mean(Whiff
|
|
|
|
| 331 |
"CSW%" = mean(CSW, na.rm = TRUE),
|
| 332 |
"Zone%" = mean(Zone, na.rm = TRUE),
|
| 333 |
"ZCon%" = mean(Contact[Zone == TRUE & Swing == TRUE], na.rm = TRUE),
|
|
@@ -373,7 +376,8 @@ server <- function(input, output) {
|
|
| 373 |
summarise(
|
| 374 |
Pitches = n(),
|
| 375 |
#BBE = sum(BBE,na.rm = TRUE),
|
| 376 |
-
"Whiff%" = mean(Whiff,na.rm = TRUE),
|
|
|
|
| 377 |
"CSW%" = mean(CSW,na.rm = TRUE),
|
| 378 |
"Zone%" = mean(Zone,na.rm = TRUE),
|
| 379 |
"ZCon%" = mean(Contact[Zone == TRUE & Swing == TRUE],na.rm = TRUE),
|
|
@@ -413,7 +417,8 @@ server <- function(input, output) {
|
|
| 413 |
summarise(
|
| 414 |
Pitches = n(),
|
| 415 |
#BBE = sum(BBE,na.rm = TRUE),
|
| 416 |
-
"Whiff%" = mean(Whiff,na.rm = TRUE),
|
|
|
|
| 417 |
"CSW%" = mean(CSW,na.rm = TRUE),
|
| 418 |
"Zone%" = mean(Zone,na.rm = TRUE),
|
| 419 |
"ZCon%" = mean(Contact[Zone == TRUE & Swing == TRUE],na.rm = TRUE),
|
|
@@ -437,7 +442,8 @@ server <- function(input, output) {
|
|
| 437 |
summarise(
|
| 438 |
Pitches = n(),
|
| 439 |
#BBE = sum(BBE,na.rm = TRUE),
|
| 440 |
-
"Whiff%" = mean(Whiff,na.rm = TRUE),
|
|
|
|
| 441 |
"CSW%" = mean(CSW,na.rm = TRUE),
|
| 442 |
"Zone%" = mean(Zone,na.rm = TRUE),
|
| 443 |
"ZCon%" = mean(Contact[Zone == TRUE & Swing == TRUE],na.rm = TRUE),
|
|
|
|
| 233 |
summarise(
|
| 234 |
Pitches = n(),
|
| 235 |
#BBE = sum(BBE,na.rm = TRUE),
|
| 236 |
+
"Whiff%" = mean(Whiff[Swing = TRUE],na.rm, = TRUE),
|
| 237 |
+
"SwStr%" = mean(Whiff,na.rm = TRUE),
|
| 238 |
"CSW%" = mean(CSW,na.rm = TRUE),
|
| 239 |
"Zone%" = mean(Zone,na.rm = TRUE),
|
| 240 |
"ZCon%" = mean(Contact[Zone == TRUE & Swing == TRUE],na.rm = TRUE),
|
|
|
|
| 277 |
Pitches = n(),
|
| 278 |
# BBE = sum(BBE,na.rm = TRUE),
|
| 279 |
"Usage%" = n() / nrow(.), # Added Usage% calculation
|
| 280 |
+
"Whiff%" = mean(Whiff[Swing = TRUE],na.rm, = TRUE),
|
| 281 |
+
"SwStr%" = mean(Whiff,na.rm = TRUE),
|
| 282 |
"CSW%" = mean(CSW, na.rm = TRUE),
|
| 283 |
"Zone%" = mean(Zone, na.rm = TRUE),
|
| 284 |
"ZCon%" = mean(Contact[Zone == TRUE & Swing == TRUE], na.rm = TRUE),
|
|
|
|
| 329 |
Pitches = n(),
|
| 330 |
#BBE = sum(BBE,na.rm = TRUE),
|
| 331 |
"Usage%" = (n() / first(total_side)),
|
| 332 |
+
"Whiff%" = mean(Whiff[Swing = TRUE],na.rm, = TRUE),
|
| 333 |
+
"SwStr%" = mean(Whiff,na.rm = TRUE),
|
| 334 |
"CSW%" = mean(CSW, na.rm = TRUE),
|
| 335 |
"Zone%" = mean(Zone, na.rm = TRUE),
|
| 336 |
"ZCon%" = mean(Contact[Zone == TRUE & Swing == TRUE], na.rm = TRUE),
|
|
|
|
| 376 |
summarise(
|
| 377 |
Pitches = n(),
|
| 378 |
#BBE = sum(BBE,na.rm = TRUE),
|
| 379 |
+
"Whiff%" = mean(Whiff[Swing = TRUE],na.rm, = TRUE),
|
| 380 |
+
"SwStr%" = mean(Whiff,na.rm = TRUE),
|
| 381 |
"CSW%" = mean(CSW,na.rm = TRUE),
|
| 382 |
"Zone%" = mean(Zone,na.rm = TRUE),
|
| 383 |
"ZCon%" = mean(Contact[Zone == TRUE & Swing == TRUE],na.rm = TRUE),
|
|
|
|
| 417 |
summarise(
|
| 418 |
Pitches = n(),
|
| 419 |
#BBE = sum(BBE,na.rm = TRUE),
|
| 420 |
+
"Whiff%" = mean(Whiff[Swing = TRUE],na.rm, = TRUE),
|
| 421 |
+
"SwStr%" = mean(Whiff,na.rm = TRUE),
|
| 422 |
"CSW%" = mean(CSW,na.rm = TRUE),
|
| 423 |
"Zone%" = mean(Zone,na.rm = TRUE),
|
| 424 |
"ZCon%" = mean(Contact[Zone == TRUE & Swing == TRUE],na.rm = TRUE),
|
|
|
|
| 442 |
summarise(
|
| 443 |
Pitches = n(),
|
| 444 |
#BBE = sum(BBE,na.rm = TRUE),
|
| 445 |
+
"Whiff%" = mean(Whiff[Swing = TRUE],na.rm, = TRUE),
|
| 446 |
+
"SwStr%" = mean(Whiff,na.rm = TRUE),
|
| 447 |
"CSW%" = mean(CSW,na.rm = TRUE),
|
| 448 |
"Zone%" = mean(Zone,na.rm = TRUE),
|
| 449 |
"ZCon%" = mean(Contact[Zone == TRUE & Swing == TRUE],na.rm = TRUE),
|