slidingRuns function

Function to detect runs using sliding window approach