Learn R Programming

nflscrapR (version 1.4.0)

expected_points: Expected point function to calculate expected points for each play in the play by play, and the expected points added in three ways, basic EPA, air yards EPA, and yards after catch EPA

Description

This function takes in the output of the game level play by play function and returns the same dataframe with a new column added for expected points for each valid play. The expected point model can loaded in the same way that datasets can be loaded for this package

Usage

expected_points(dataset)

Arguments

dataset

(data.frame object) A data.frame as exported from the game_play_by_play function

Value

The input dataframe with the addition of expected points columns