title: How to create multiple range from a list of numbers in R?
body: <p>If i have a list of numbers:</p>
  
  <pre><code>&gt; list1
   [1]   58659   59837 2603675 2607619 2607631 2608098 2608106 2608975 2608978 2609613
   [11] 2609635 2610225 2610235 2610408 2610453 2610782 2610799 2611212 2611232 2611642
   [21] 2611646 2611825 2611828 2612151 2612154 2612741 2612943 2614220 2614222 2614941
   [31] 2615008 2616276 2616304 2617656
  </code></pre>
  
  <p>Is there a function that creates two list based on the threshold (For example <code>100000</code>) i provide and results in</p>
  
  <pre><code>[1] 58659 59837 2603675 2617656
  </code></pre>
  
  <p>Another simpler example</p>
  
  <pre><code>&gt;list2
  [1] 1 2 3 4 11 12 13 14
  </code></pre>
  
  <p>with a threshold of 2, it will give out</p>
  
  <p>[1] 1 4 11 14</p>