R/expected_pts_fourth.R
expected_pts_fourth.Rd
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)
The number of yards until a team scores a touchdown
Number of yards to go until a first down or TD
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
if (FALSE) {
expected_pts_fourth(what_down = 1,
yards_to_go = 10,
yards_from_own_goal = 25,
play_by_play_data = reg_pbp_2018)
}