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