search for: list_to_keep

Displaying 1 result from an estimated 1 matches for "list_to_keep".

2012 Mar 31
1
basic subset question of matrix
...rge expression matrix based on rownames. That is, I have a list (as a txt-file) with gene names that matches some of the rows in my matrix. I've loaded my matrix as well as gene list using the read.table() command. myMatrix <- read.table("name_of_file.txt", header=T, row.names=1) list_to_keep <- read.table("name_of_file.txt", header=T) Thus, both my objects are data frames (however, "list_to_keep" only have one column). How do I remove/filter all the rows in my matrix that don't match the ones in my list_to_keep data frame? My initial attempt - although uns...