I have a matrix with the following row.names:
"X1" "X5" "X33" "X37" "X52" "X566"
Now I want to select only the rows which match the entries of a list, say:
include_list <- c("X1", "X5", "X33")
I imagine I'd do something like this:
data.subset <- subset(data, row.names == include_list)
However, this particular code does not seem to do the job. How can I perform subsetting in this way?
See Question&Answers more detail:os