title: Create list from each column of matrix in R
body: <p>I have a matrix <code>M</code> and I want to create 3 lists that each list contains row names of matrix <code>M</code> means that fro examle for the fisrt list, I want to have <code>m[, 1]$a = 1</code> and <code>m[ ,1]$b = 2</code>.  How can I do this in R for each column?</p>
  
  <pre><code>    m
        [,1] [,2] [,3]
    a    1    3    5
    b    2    4    6
  </code></pre>
  
  <p>I have tried this code, but it's not my desire result</p>
  
  <pre><code>  &gt; list(m[, 1])
    [[1]]
     a b 
     1 2
  </code></pre>