I have the following list of numeric values in R:
sales_by_hour = c(130, 21, 0, 0, 0, 0, 6, 244, 391, 408, 431, 0, 0, 471,
530, 573, 643, 643, 667, 787, 990, 1024, 1012, 712)
Then I have applied the following code to obtain the indexes of the min values
which(test2==0)
which returns the values c(3,4,5,6,12,13)
. However I would like to then split again this list in 2 or more lists ex. c(3,4,5,6)
and c(12,13)
, since I want to separate non consecutive series of number.