Defines sliding periods of a specified length for temporal calculations, handling wrap-around cases for circular data.
compute_periods(n_units, period_length, circular = TRUE)List where each element contains `period_length` consecutive unit indices.
Integer. The total number of temporal units (layers).
Integer. The number of consecutive units in each period.
Logical. If TRUE, allows periods to wrap around.