title: Joining on incorrect data using dplyr
body: <p>So I have a lookup table like this:</p>
  <pre><code>ID Descrip
  11 Apples
  12 Bananas
  13 Grapes
  14 Cherries
  </code></pre>
  <p>However my data looks like this:</p>
  <pre><code>col
  11
  13
  11
  12
  12
  Apples
  Cherries
  Bananas
  Ba_nanas
  14
  </code></pre>
  <p>So I want to match <code>col</code> to the lookup and have data like this:</p>
  <pre><code>col    Descrip
  11     Apples
  13     Grapes
  11     Apples
  12     Bananas
  12     Bananas
  11     Apples
  14     Cherries
  12     Bananas
  NA     NA
  14     Cherries
  </code></pre>
  <p>So to note, if there is no match in either, both should be nulled out, like <code>Ba_nanas</code></p>
  <p>I tried the following and it works, but only in one direction.....</p>
  <pre><code>df &lt;- df %&gt;%
    mutate(col = ifelse(nchar(col)&gt;2, NA ,col))
    left_join(lookup, by =c(&quot;col&quot; = &quot;ID&quot;))
  </code></pre>
  <p>I would really like to stick to revolving around replacing when <code>nchar &gt; 2</code> if possible.</p>