title: R: position element x[m]>value for which all subsequent elements i>m also x[i]>value
body: <p>on the forum I found the <code>?which()</code> command and applied it on a vector containing a sequence of time indexed values as follows:</p>
  
  <pre><code>first.element &lt;- which(e&gt;0)[1]
  </code></pre>
  
  <p>to find the first element for which <code>e!=0</code> but now I want to be sure that also all subsequent elements are <code>&gt;0</code> cos I'm not searching for the first element <code>e&gt;0</code> but for the first elemtn 'e>0' for which also all subsequent elements in the vector are larger than 0.</p>
  
  <p>Usually search on the internet sooner or later delivers the proper code but this time I wasn't successful. If one of you knows a solution I'd be very thankful.</p>
  
  <p>BR</p>