title: No applicable method for 'anti_join' applied to an object of class "factor"
body: <p>I want to Identify the rows present in dataframe1 which are not present in dataframe2 based on a particular column. I have used the below code to get the desired information.</p>
  
  <pre><code>diffId &lt;- anti_join(dat$ID,datwe$ID)
  </code></pre>
  
  <p>Unfortunately, I have encountered with an error:</p>
  
  <blockquote>
    <p>Error in UseMethod("anti_join") :<br>
    no applicable method for 'anti_join' applied to an object of class "factor"</p>
  </blockquote>
  
  <p>I have checked the class of the desired column in both the dataframes and which turned out to be <code>factor</code>. Have also tried to separate the column into a separate variable in an assumption that it might solve the issue, but of no luck !</p>
  
  <pre><code>fac1 &lt;- datwe$ID
  fac2 &lt;- dat$ID
  diffId &lt;- anti_join(fac2,fac1)
  </code></pre>
  
  <p>Could you please share your thoughts ?</p>
  
  <p>Thanks</p>