TimStats commited on
Commit
1530d6c
·
verified ·
1 Parent(s): aa2f688

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +4 -1
app.R CHANGED
@@ -26,6 +26,8 @@ VAA <- function(milbtotal){
26
  ay))/(-sqrt((vy0*vy0)-(2*ay*(y0-(17/12))))))*(180/pi))
27
  }
28
  pitcher_summary <- function(game_pk){
 
 
29
  tmilb <- mlb_pbp(game_pk)
30
  tmilb <- tmilb |>
31
  filter(type == "pitch")
@@ -50,7 +52,8 @@ pitcher_summary <- function(game_pk){
50
  tmilb <- tmilb |>
51
  mutate(is_strike_swinging = ifelse(description == "Swinging Strike" |
52
  description == "Foul Tip",TRUE,FALSE))
53
-
 
54
  return(tmilb)
55
 
56
  }
 
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[x,1])
30
+ gdate <- as.Date(gdate)
31
  tmilb <- mlb_pbp(game_pk)
32
  tmilb <- tmilb |>
33
  filter(type == "pitch")
 
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
  }