title: Linking two tables and looking for association tables
body: <p>I working in r-studio trying to link two already loaded tables and then look for association rules.  </p>
  
  <h2>The set-up:</h2>
  
  <p>I have two tables of data:  </p>
  
  <ul>
  <li>"uData" with the fields [user.id, rating, timestamp] </li>
  <li>"uUser" with the fields [user.id, age, gender, occupation]</li>
  </ul>
  
  <p>In uData each user can appear more than once, while in uUser each is listed just once.  I have loaded the data in using r-studios import dataset. I using arules, datasets, graphics, grDecies, lattice, Matrix, methods, stats, and utils packages. </p>
  
  <h2>End goal:</h2>
  
  <p>Find the association rules between rating, age and gender</p>
  
  <h2>Q1</h2>
  
  <p>I believe I would need to iterate through my uData table and pull in the age and gender for each line from uUser.  I'm unsure how to make the new table or if a new table is necessary to accomplish my end goal.</p>
  
  <h2>Q2</h2>
  
  <p>The end goal is to try to find the association rules.  I have been trying to use </p>
  
  <blockquote>
    <p>rules &lt;- apriori(<strong><em>_</em>_</strong>, parameter = list(supp = .5, conf = .9, target = "<strong>_</strong>"))</p>
  </blockquote>
  
  <p>After looking over some tutorials I'm getting it to work for dummy data but not the data I have loaded. I am not sure how to have each row labeled a transaction.  I have tried</p>
  
  <blockquote>
    <p>transactions = read.transactions(uUser)</p>
  </blockquote>
  
  <p>but this is met with warnings.  Any help is appreciated.</p>
  
  <hr>
  
  <p>Here is a couple lines of data from uData:</p>
  
  <pre><code>user.id rating  timestamp
  1       4   878542420
  1       3   888732928
  4       4   878542699
  1       4   875072547
  5       3   875636053
  </code></pre>
  
  <p>Here is a couple lines of data from uUser:</p>
  
  <pre><code>index   user.id age gender  occupation
  1           1   24  M   technician
  2           2   53  F   other     
  3           3   23  M   writer    
  4           4   24  M   technician
  5           5   33  F   other     
  </code></pre>