title: How to search for a specific number of consecutive values above 0 in r?
body: <p>I need to create a function to search for at least 5 values above 0.</p>
  <pre><code>df1 &lt;- c( M, A, T, A, N, S, I, I, V, L)
  df2 &lt;- c( 1.2, -0.15, -0.8, 0.5, 1.175, 3.1, 4.25, 2.25, 0.25, -1.675)
  </code></pre>
  <p>For example we have two columns:</p>
  <pre><code>V1  V2
  M   1.2
  A  -0.15
  T  -0.8
  A   0.5
  N   1.175
  S   3.1
  I   4.25
  I   2.25
  V   0.25
  L  -1.675
  </code></pre>
  <p>If there are at least 5 consecutive values above 0 found, print the corresponding letters.</p>
  <p>For the example above, the output would be: ANSIIV.</p>
  <p>There might be more that one listing above 0 and number of rows can vary.</p>