Find the starting indices of runs in a vector.
rsi(x)
x
a vector of data.
a vector of indices indicating starting points for runs
rsi(c(0,0,0,1,2,2,3,3,3,3,3,4))