title: R, getting the Subset of row vectors in a Matrix
body: <p>in R, I want to create a matrix which is a subset of a matrix <code>mat2</code> based on some criteria stored in another vector <code>km$cluster$</code>. Specifically, I want to get a subset of <code>mat2</code> where the row names from <code>km$cluster[km$cluster == 3]</code> (that is the vectors in cluster 3 from a kmeans clustering) are equal to the row names in <code>mat2</code></p>
  
  <ol>
  <li>How do I get this subset of <code>mat2</code>?</li>
  </ol>