title: Add new value to new column based on if value exists in other dataframe in R
body: <p>I have two dataframes called <em>users</em> and <em>purchases</em> with thousands of datasets to each. Both have a feature called <em>ID</em>.</p>
  
  <p>My aim is to add a new column called <em>buyer</em> to the dataframe <em>purchases</em>, if the value of <em>ID</em> of <em>purchases</em> exists in <em>ID</em> of <em>users</em>.</p>
  
  <p>So the two dataframes look like this:</p>
  
  <pre><code>users = data.frame("ID" = c(23432,75645,5465645,5656,6456))
  purchases = data.frame("ID" = c(6456,4436,88945))
  </code></pre>
  
  <p>It should look like:
  <a href="https://i.stack.imgur.com/d6PSH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d6PSH.png" alt="Desired outcome"></a></p>