title: How to check matching between dataframes?
body: <p>I have df:</p>
  <pre><code>A &lt;- c(&quot;010410&quot;, &quot;010420&quot;,&quot;010511&quot;,&quot;010519&quot;,&quot;010519&quot;,&quot;010591&quot;,&quot;010591&quot;,NA,NA)
  B &lt;- c(&quot;010392&quot;,&quot;010410&quot;,&quot;010420&quot;,&quot;010511&quot;,&quot;010512&quot;,&quot;010519&quot;,&quot;010592&quot;,&quot;010592&quot;,&quot;010593&quot;)
  C &lt;- c(&quot;010410&quot;, &quot;010420&quot;, &quot;010511&quot;, &quot;010512&quot;, &quot;010519&quot;, &quot;010594&quot;, &quot;010594&quot;, &quot;010599&quot;,NA)
  D &lt;- c(&quot;010231&quot;, &quot;010239&quot;, &quot;010290&quot;, &quot;010290&quot;, &quot;010310&quot;, &quot;010391&quot;, &quot;010392&quot;, &quot;010410&quot;, &quot;010420&quot;)
  
  df &lt;- data.frame(A,B,C,D)
  </code></pre>
  <p>Now I want to find out in which columns match the following codes and return the dataframe where will be YES and NOW across A B C &amp; D columns</p>
  <pre><code>df2 &lt;- as.data.frame(c(&quot;010410&quot;,&quot;010420&quot;,&quot;010511&quot;,&quot;010512&quot;,&quot;010519&quot;,&quot;010290&quot;))
  </code></pre>
  <ul>
  <li>YES - if it matches</li>
  <li>NO- if such code does not exist in this column</li>
  </ul>
  <p>Expected outcome:</p>
  <pre><code>         A      B       C       D
  010410  YES    YES     YES     YES 
  010420  YES    YES     YES     YES
  010511  YES    YES     YES     NO
  010512  NO     YES     YES     NO
  010519  YES    YES     YES     NO
  010290  NO      NO      NO     YES
  </code></pre>