title: Filter on diff in R data.table
body: <p>I would like to filter on the result of the diff() function and use the efficiency of data.table. </p>
  
  <pre><code>DT[diff(timestamp) &gt; 10]
  </code></pre>
  
  <p>won't do the work as the resultset is shorter than the source. Even creating a filter and than subsetting creates at least a warn (which I would like to prevent). </p>
  
  <pre><code>DT[, filter := diff(timestamp) &gt; 10]
  </code></pre>
  
  <p>I could use dplyr or else, but I would like the efficency of data.table. Any suggestions?</p>