TimStats commited on
Commit
f4289ee
·
verified ·
1 Parent(s): cf6681d

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +5 -6
app.R CHANGED
@@ -25,9 +25,8 @@ VAA <- function(milbtotal){
25
  mutate(VAA = -atan((vz0+(az*(-sqrt((vy0*vy0)-(2*ay*(y0-(17/12))))-vy0)/
26
  ay))/(-sqrt((vy0*vy0)-(2*ay*(y0-(17/12))))))*(180/pi))
27
  }
28
- pitcher_summary <- function(game_pk){
29
- gdate <- as.Date.character(mlbid[1,1])
30
- gdate <- as.Date(gdate)
31
  tmilb <- mlb_pbp(game_pk)
32
  tmilb <- tmilb |>
33
  filter(type == "pitch")
@@ -52,9 +51,9 @@ pitcher_summary <- function(game_pk){
52
  tmilb <- tmilb |>
53
  mutate(is_strike_swinging = ifelse(description == "Swinging Strike" |
54
  description == "Foul Tip",TRUE,FALSE))
55
- tmilb <- tmilb |>
56
- mutate(date = gdate)
57
- return(tmilb)
58
 
59
  }
60
  break_plot <- function(game){
 
25
  mutate(VAA = -atan((vz0+(az*(-sqrt((vy0*vy0)-(2*ay*(y0-(17/12))))-vy0)/
26
  ay))/(-sqrt((vy0*vy0)-(2*ay*(y0-(17/12))))))*(180/pi))
27
  }
28
+ pitcher_summary <- function(game_pk,date){
29
+ #gdate <- as.Date.character(date)
 
30
  tmilb <- mlb_pbp(game_pk)
31
  tmilb <- tmilb |>
32
  filter(type == "pitch")
 
51
  tmilb <- tmilb |>
52
  mutate(is_strike_swinging = ifelse(description == "Swinging Strike" |
53
  description == "Foul Tip",TRUE,FALSE))
54
+ # tmilb <- tmilb |>
55
+ # mutate(date = gdate)
56
+ # return(tmilb)
57
 
58
  }
59
  break_plot <- function(game){