title: How to get when a column becomes lower than another and when it becomes higher?
body: <p>I'm working with a large data.table. Consider the following as an example:</p>
  
  <pre><code>#1st row is 
  A &lt;- c(8,8,8,8,8,8,8,8,8,8) 
  #2nd row is
  B &lt;- c(9,9,7,6,5,6,7,7,8,8)
  </code></pre>
  
  <p>I need to know when B starts to be lower than A and when it becomes higher or equal to A.</p>
  
  <p>What i want here is a Table like this:</p>
  
  <pre><code>begin end
    3    9
  </code></pre>