Add values into X number of lag rows
I have a continuous dataset with measurements every 5 minutes over many years. Certain time periods have been designated and assigned and ID# (e.g. 1, 2, 3,... 500). For each of these periods of time that received an ID I want to extend the column ID backwards in time for 4 hours (ie 48 rows back). So for example If the period categorized as ID# 200 starts on 1/1/2020 at 12:00PM, then I currently ...
