title: Matrix transformation and aggregation in R
body: <p>I am starting development with R and I am still having "beginner problems" with the language. I would like to do the following:</p>
  
  <ol>
  <li>I have a matrix (data frame:=user) with ~900 columns, each of them is the name of a band (Nirvana, Green Day, Daft-Punk, etc.).</li>
  <li>In each row I have an user and the user's music taste (Nirvana = 10, Green Day=5, Daft Punkt=0)</li>
  <li>I would like to query another dataframe(:=artists - with the artist's music tags) and substitute the name of the bands by its Genre-Tag (Nirvana --> Rock, Green Day --> Rock, Daft-Punk --> Techno). There are ~120 Tags for music taste (120 &lt; 900)</li>
  <li>And finally, I would like to "aggregate" the values over all columns to avoid duplicated columns. In the example from (3) - with the aggregation function "SUM" - the row would have only 2 entries and not 3: (Rock = 15, Techno=0)</li>
  </ol>
  
  <p>Any clues on how to do that with R? Thanks in advance for any help!</p>
  
  <p>Data:</p>
  
  <p><code>user</code>: <a href="http://pastebin.com/4gVe004T" rel="nofollow">pastebin.com/4gVe004T</a></p>
  
  <p><code>artists</code>: <a href="http://pastebin.com/dm7weLMG" rel="nofollow">pastebin.com/dm7weLMG</a></p>