title: Finding minimum of two rows at a time in a column for every row - R
body: <p>I need to find the min value between two rows in my data set, for every row. So this would be, the min value in rows 1&amp;1, 1&amp;2, 2&amp;3 etc. I need the first row of the new array to be 0 (corresponding to the first value of the array) to get a new array of the same length. </p>
  
  <p>This is easier for subtraction... e.g. <code>Cl &lt;- abs(diff(data$Cl,lag=1))</code>, however I can't seem to get this for the min value.    </p>
  
  <p>Here is my data:</p>
  
  <pre><code>cl
  0.000
  0.297
  0.000
  1.067
  2.484
  4.851
  7.471
  12.671
  16.221
  17.141
  18.021
  19.011
  20.581
  22.561
  22.131
  19.731
  15.161
  9.261
  9.311
  1.602
  0.000
  </code></pre>
  
  <p>Advice/hints welcome!</p>