title: How to check if a vector contains n consecutive numbers
body: <p>Suppose that my vector numbers contains c(1,2,3,5,7,8), and I wish to find if it contains 3 consecutive numbers, which in this case, are 1,2,3.</p>
  
  <pre><code>numbers = c(1,2,3,5,7,8)
  difference = diff(numbers) //The difference output would be 1,1,2,2,1
  </code></pre>
  
  <p>To verify that there are 3 consecutive integers in my numbers vector, I've tried the following with little reward.</p>
  
  <pre><code>rep(1,2)%in%difference 
  </code></pre>
  
  <p>The above code works in this case, but if my difference vector = (1,2,2,2,1), it would still return TRUE even though the "1"s are not consecutive.</p>