DaveM2430 commited on
Commit
6c03b9d
·
verified ·
1 Parent(s): 09f00ea

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +2 -1
app.R CHANGED
@@ -36,6 +36,7 @@ build_pitcher_stats <- function(df, min_pitches) {
36
  ) %>%
37
  group_by(Pitcher, Level) %>%
38
  summarise(
 
39
  Pitches = n(),
40
  K = sum(IsK, na.rm=TRUE),
41
  BB = sum(IsBB, na.rm=TRUE),
@@ -76,7 +77,7 @@ build_pitcher_stats <- function(df, min_pitches) {
76
  # must have both first and last name (at least one space)
77
  grepl(" ", trimws(Name))
78
  ) %>%
79
- select(Name, Level, Pitches, `Zone%`, `Strike%`, `K's`, `BB's`,
80
  `K/BB`, `Whiff%`, `Chase%`, `Hard Hit%`) %>%
81
  arrange(desc(Pitches))
82
  }
 
36
  ) %>%
37
  group_by(Pitcher, Level) %>%
38
  summarise(
39
+ Team = PitcherTeam,
40
  Pitches = n(),
41
  K = sum(IsK, na.rm=TRUE),
42
  BB = sum(IsBB, na.rm=TRUE),
 
77
  # must have both first and last name (at least one space)
78
  grepl(" ", trimws(Name))
79
  ) %>%
80
+ select(Name, Level, Team, Pitches, `Zone%`, `Strike%`, `K's`, `BB's`,
81
  `K/BB`, `Whiff%`, `Chase%`, `Hard Hit%`) %>%
82
  arrange(desc(Pitches))
83
  }