The down and distance updater will run a play and update various game-based statistics accordingly.
down_distance_updater(
what_down,
yards_to_go,
yards_from_own_goal,
play_by_play_data,
...
)
The current down (1st, 2nd, 3rd, or 4th down)
Number of yards to go until a first down or TD
The number of yards from the possession team's own goal
A data file from nflscrapR prepped using the prep_pbp_data.R function
Additional arguments for different strategies
A data.frame object
if (FALSE) {
down_distance_updater(what_down = 1,
yards_to_go = 10,
yards_from_own_goal = 25,
play_by_play_data = pbp_data,
strategy = "normal")
}