Compute the number of lags
lag_num(x.lag, period, unit)
x.lag
period
unit
numeric value of the number of lags.
Useful links