how to extract columns from csv using a list of name
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.
• 1,672 views
•
link
1 answer
Log in to answer this question.
Simply use
yourmatrix[,your list]invalid subscript type 'list'
Sorry I do not speak robot