title: R, adding an attribute to each row of a Matrix
body: <p>In R, I have a matrix: <code>matClust4</code> which holds all vectors that are in cluster 4 after executing the <code>kmeans</code> algorithm. </p>
  
  <p><code>matClust4</code> has dimensions 27 X 31 and has the <code>rownames</code> attribute set for each vector.
  What I would like to do is give another attribute to each row vector in <code>matClust4</code></p>
  
  <p>I would prefer to use the <code>apply</code> function. I would like to try something like this:</p>
  
  <pre><code>apply(matClust4, 1, function(v) SOME_ATTRIBUTE(v) = idClust4)
  
  #where idClust4 is some previous calculated result
  </code></pre>
  
  <ol>
  <li>How can I create/use an attribute of <code>matClust4</code> to do this?</li>
  </ol>