I have a matrix M , and I want to create 3 lists in which each list contains row names of the matrix M , which means for the example for the list fisrt I want to have m[, 1]$a = 1 and m[ ,1]$b = 2 . How can I do this in R for each column?
m [,1] [,2] [,3] a 1 3 5 b 2 4 6
I tried this code, but it is not my desire
> list(m[, 1]) [[1]] ab 1 2
source share