Suppose a list called list_x is made up of 10 different matrices, the dim of all these matrices is 5 * 3. Now, what I want to do is:
- Extract the first column of each matrix and vertically merged into a new matrix A
- Extract the second column of each matrix and vertically merged into a new matrix B
- Extract the third column of each matrix and vertically merged into a new matrix C
I thought of it, but just can write here
sapply(list_X, function(x) x[,1])
Thank for any help.