

Hello,

Here's my problem. I have a large data frame and a vector with some of its row names. I'd like to have a new data frame only with those rows that match this vector of row names.

I tried this:

data<-cbind(c(1,2,3,4,5,6),c(2,3,4,5,6,7))
rownames(data)<-c("a", "b", "c","d","e","f")
names.to.keep<-c("a", "c", "d")
rows.to.keep<-which(rownames(data)==names.to.keep)

But it didn't work. Any suggestions?

thanks a lot.

Jonathan.
 		 	   		  
	[[alternative HTML version deleted]]

