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,
  ...
)

Arguments

what_down

The current down (1st, 2nd, 3rd, or 4th down)

yards_to_go

Number of yards to go until a first down or TD

yards_from_own_goal

The number of yards from the possession team's own goal

play_by_play_data

A data file from nflscrapR prepped using the prep_pbp_data.R function

...

Additional arguments for different strategies

Value

A data.frame object

Examples

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")
}