title: full_join but with condition on matching
body: <p>I am going to try to make this as simple as possible, I would like a <code>dplyr</code> solution if possible:</p>
  <p>Let's say I have a <code>DataFrame</code> of 2 <code>columns</code> called <code>f1</code>. The 2 columns are the reference number of an event and the date_begin is the begin date of the event:</p>
  <pre><code>f1
         reference date_begin
  1 01100144609598 2020-08-15
  2 01100144692499 2020-08-12
  3 01100144609598 2020-08-09
  4 01100434045112 2020-08-26
  5 01100434067379 2020-08-24
  6 01100723546188 2020-08-16
  </code></pre>
  <p>I also have another <code>DataFrame</code> called <code>f2</code> with 2 <code>columns</code>. The 2 columns are the reference number of an event and the date_end is the ending date of the event:</p>
  <pre><code>      reference  date_end
  1 01100144609598 2020-09-06
  2 01100144692499 2020-08-10
  3 01100434121179 2020-08-25
  4 01100578756185 2020-08-17
  5 01100578757962 2020-08-31
  6 01100578846401 2020-08-16
  </code></pre>
  <p>I want to use a <code>full_join</code> by reference. That being said:</p>
  <ol>
  <li>If there is an end date before there is a begin date I want an NA in stead of the begin date</li>
  <li>The end date has to be &gt; than the begin date</li>
  <li>If there are 2 end dates for the same reference that are bigger than a begin date take the smallest end date</li>
  <li>If there is a begin date with no end date the end date should have an NA</li>
  </ol>
  <p>So in this reproducible example I should have an f3 that looks something like the following :</p>
  <pre><code>           reference date_begin date_end
      1 01100144609598 2020-08-15 2020-09-06
      2 01100144692499      NA    2020-08-10
      3 01100144692499 2020-08-12      NA
      4 01100434121179      NA    2020-08-25
      5 01100578756185      NA    2020-08-17
      6 01100578757962      NA    2020-08-31
      7 01100578846401      NA    2020-08-16
      8 01100144609598 2020-08-09      NA
      9 01100434045112 2020-08-26      NA
     10 01100434067379 2020-08-24      NA
     11 01100723546188 2020-08-16      NA
  </code></pre>