title: How to detect and distinguish between first, second, and third increases in a vector of numbers
body: <p>Say I have the following vector:</p>
  <pre><code>vector &lt;- c(5,5,11,11,7,16,16,16,12,8,20,24,20)
  </code></pre>
  <p>As we can see, there are 4 separate increases in this vector, though lets just say we only care about the first 3. These 3 increases are: from 2nd element to 3rd element (increase from 5 to 11, which is an increase of 6), from 5th element to 6th element (increase from 7 to 16, which is an increase of 9), and from 10th element to 11th element (increase from 8 to 20, which is an increase of 12). I am looking for some help on constructing some sort of for loop algorithm to store the amount of each of these increases in separate variables. Thus far, I know how to detect each of the increases, but I have no idea how to distinguish between each of them in order to store them separately. Any help would be much appreciated!</p>