powered by
# Find all contiguous ranges containing 2 x <- sample(c(1,2,2,2,3,4), 20, replace=TRUE) range.for(2,x)
Run the code above in your browser using DataLab