Skip to content

Commit

Permalink
Update decision_functions.R: Missed FG yard position
Browse files Browse the repository at this point in the history
Signed-off-by: Jared Lee <[email protected]>
  • Loading branch information
Kazink36 authored Jan 21, 2025
1 parent 521b47a commit bdbfb4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/decision_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ get_fg_wp <- function(pbp) {
miss_df <- dat %>%
flip_team() %>%
dplyr::mutate(
yards_to_goal = (100 - .data$yards_to_goal) - 8,
yards_to_goal = (100 - .data$yards_to_goal),
# yards_to_goal can't be bigger than 80 due to some weird nfl rule *Check rule for college?
yards_to_goal = dplyr::if_else(.data$yards_to_goal > 80, 80, .data$yards_to_goal),
yards_to_goal = ifelse(.data$yards_to_goal < 1, 1, .data$yards_to_goal)
Expand Down

0 comments on commit bdbfb4b

Please sign in to comment.