title: Combine two tables in R
body: <p>I have 2 tables and need to combine them using R as follows:-</p>
  
  <pre><code>Table 1
  
  id
  A
  B
  C
  D
  
  Table 2
  
  group class
  1     X
  2     Y
  </code></pre>
  
  <p>I need a combined table like this:- </p>
  
  <pre><code>id group class
  A  1     X
  B  1     X
  C  1     X
  D  1     X
  A  2     Y
  B  2     Y
  C  2     Y
  D  2     Y
  </code></pre>
  
  <p>I tried many types of merges (like inner, left, full join etc) by creating dummy columns in the tables, but couldn't get the desired output. Any help will be of great help</p>