title: How to subset multiple rows from data.table fast on big data
body: <p>I'm working with R-Studio and want to get multiple rows from a data.table.</p>
  
  <p>Let's say I have a data.table with the following data:</p>
  
  <pre><code>Date                           Column 1
  "01.02.2016 10:00:00  CEST"    10        
  "01.02.2016 10:01:00  CEST"    12
  "01.02.2016 10:02:00  CEST"    13
  "01.02.2016 10:03:00  CEST"    11
  "01.02.2016 10:04:00  CEST"    17
  </code></pre>
  
  <p>and I want to get the values from <strong>"01.02.2016 10:00:30"</strong> to <strong>"01.02.2016 10:02:30"</strong> like this:</p>
  
  <pre><code>    Date                       Column 1       
  "01.02.2016 10:01:00  CEST"    12
  "01.02.2016 10:02:00  CEST"    13
  </code></pre>
  
  <p>at the moment I achieve this by doing this:</p>
  
  <pre><code>x &lt;- data.table[Date &gt;= "01.02.2016 10:00:30  CEST" &amp; Date &lt;= "01.02.2016 10:02:30  CEST"]
  </code></pre>
  
  <p>But this is far too slow for me, because on a data.table with 600k rows it takes about 0.4 seconds.</p>
  
  <p>Instead this is much much faster:</p>
  
  <pre><code>setkey(data.table, Date)
  x &lt;- prozessdaten.data.table[J(c("01.02.2016 10:01:00  CEST", "01.02.2016 10:02:00  CEST"))]
  </code></pre>
  
  <p>My Question is there a possibility to use the binary Search function J() with a specified time range and not exact values?</p>