I have a large data set in the form of a matrix, each row has its own unique name. I have a list of row names where I want to keep that data in that row. Is there a way that I can keep only the rows of my matrix that have row names in common with my list of row names? i.e. Can I throw out any row that does not have a row name in my list and be left with a matrix of the rows with names from my list?
Any help would be greatly appreciated! My current method is slow and very circuitous.