maksimhorowitz / nflscrapR

R Package for Scraping and Aggregating NFL Data
522 stars 139 forks source link

Fixed the Issue on Plays with a completed pass, YAC 0, and accepted penalty where air_epa was incorrect #163

Closed dutta closed 4 years ago

dutta commented 4 years ago

There was an issue on pass plays with YAC 0, if there is an accepted penalty, then air_epa became epa rather than YAC epa being set to epa-air_epa.

The analogous issue was happening with air_wpa and yac_wpa. I added the check for both cases to prevent this issue from happening.