title: R lookup between values
body: <p>I'm relatively new to R and I'm trying to do a lookup between multiple data frames.
  I have df1 which shows when my car enters/exits our fleet. df2 shows when it is being serviced.
  I want to create df3 which shows for a specific set of Cars (per colheaders) whether they are available at a given timestep (Yes/No or 1/0 result).</p>
  <p>Example data is below, there would be a number of cars in df1 and df2 but not all of these would be in df3.</p>
  <p>I've tried doing between and foverlaps but had no success and I'm beginning to wonder if this is actually something that can be done in R or if I need to revert to lots of if statements in excel.</p>
  <p>df1</p>
  <pre><code>CarID Entry Exit
  Car1  1   100
  Car2  5   95
  </code></pre>
  <p>etc</p>
  <p>df2 (shows service schedule)</p>
  <pre><code>CarID  ServiceType  Start  End
  Car1  TypeA  10  20
  Car1  TypeA  30  40
  Car1  TypeB  45  46
  Car2  TypeA  20  30
  </code></pre>
  <p>etc.</p>
  <p>df3 (want to create/populate this table)</p>
  <pre><code>Date  Car1  Car2 
  1
  2
  </code></pre>