title: Merge two `data.table` objects
body: <p>I have two data sets and I want to map the second data set to the first one:</p>
  
  <pre><code>n &lt;- c(2, 3, 5,6,7,8) 
  s &lt;- c("aa", "bb", "cc","aa", "bb", "cc") 
  b &lt;- c(TRUE, FALSE, TRUE, FALSE, TRUE, FALSE) 
  df &lt;- data.table(n, s, b) 
  
  rs &lt;- c("aa", "bb", "cc") 
  replace1 &lt;- c("Product 1", "Product 2", "Product 3") 
  replace2 &lt;- c("Customer 1", "Customer 2", "Customer 3") 
  
  df.replace &lt;- data.table(rs, replace1, replace2) 
  </code></pre>
  
  <p>So Basically if in <code>df</code> is an <code>aa</code>, I want to add a column with <code>Product 1</code> and <code>Customer 1</code>.</p>
  
  <p>Furthermore, I am also using the <code>data.table</code> package for speed, because my files are greater than 2 GB each. Either the mapping files and also the file that I have to map the values to.</p>
  
  <p>Any recommendations how to implement this in R?</p>
  
  <p><strong>Update</strong></p>
  
  <p>My desired output:</p>
  
  <p><img src="https://i.stack.imgur.com/3CetB.jpg" alt="enter image description here"></p>