View source: R/down_distance_updater.R
down_distance_updater | R Documentation |
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, ... )
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 |
A data.frame object
## Not run: down_distance_updater(what_down = 1, yards_to_go = 10, yards_from_own_goal = 25, play_by_play_data = pbp_data, strategy = "normal") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.