expected_pts_fourth {NFLSimulatoR} | R Documentation |
This function will return the expected points for several 4th down decision. The options are "go for it", "field goal", or "punt". This should be primarily used within the 'NFLSimulatoR::sample_play()' function.
expected_pts_fourth(yards_from_goal, yards_to_go, play_data)
yards_from_goal |
The number of yards until a team scores a touchdown |
yards_to_go |
Number of yards to go until a first down or TD |
play_data |
A data file from nflscrapR prepped using the prep_pbp_data.R function |
A data.frame of the expected points of three fourth down options
## Not run:
expected_pts_fourth(what_down = 1,
yards_to_go = 10,
yards_from_own_goal = 25,
play_by_play_data = reg_pbp_2018)
## End(Not run)