It appears the way season_play_by_play scrapes or calculates the PlayTimeDiff associates the previous play's time an entry later(possibly from the subtraction of the clock at a play's start time). This was observed with touchbacks and extra points having PlayTimeDiff values. I'm unsure if this is intended. I remedied this so far by shifting the PlayTimeDiff column up a row and adding it as a new column with shift <- function(x, n){ c(x[-(seq(n))], rep(NA, n)) }
It appears the way season_play_by_play scrapes or calculates the PlayTimeDiff associates the previous play's time an entry later(possibly from the subtraction of the clock at a play's start time). This was observed with touchbacks and extra points having PlayTimeDiff values. I'm unsure if this is intended. I remedied this so far by shifting the PlayTimeDiff column up a row and adding it as a new column with
shift <- function(x, n){ c(x[-(seq(n))], rep(NA, n)) }