title: R, accessing a column vector of a matrix by name
body: <p>In R I can access the data in a column vector of a column matrix by the following:</p>
  
  <pre><code>mat2[,1]
  </code></pre>
  
  <p>Each column of <code>mat2</code> has a name. How can I retrieve the data from the first column by using the name attribute instead of <code>[,1]</code>?</p>
  
  <p>For example suppose my first column had the name "saturn". I want something like</p>
  
  <p><code>mat2[,1] == mat2[saturn]</code> </p>