Entering edit mode
2.4 years ago
baijiangshan9726
•
0
I have a list of name, c <- ("a","c","e"), which is a subset of the column names from a matrix(let's say the column names are "a","b","c","d","e","f"). Now I want to use the list of name to extract corresponding columns from this matrix, how should I do this in R.
Simply use
yourmatrix[,your list]
invalid subscript type 'list'
Sorry I do not speak robot