[R] How to find data that includes certain values

poppinkid jtlu at bcm.edu
Fri Jan 21 18:26:48 CET 2011


I am trying to return an index for a data set by searching using filenames.  

The name may be ANG_AUT.N.0734C70411A-1_1sA_0734C70411A.fasta, but i'd just
like to search it using the term "0734C70411"  as the file may be
0734C70411A or 0734C70411C or 0734C70411D

Any way to do this other than doing something like this.  where 0734C70411A
is part of matrix list[,8]

samp=paste("ANG_AUT.N.",list[i,8],"-1_1sA_",list[i,8],".fasta",sep="")
data[which(data[,2]==samp),]

This is similar to the =~/ / function in perl.


Thanks
-- 
View this message in context: http://r.789695.n4.nabble.com/How-to-find-data-that-includes-certain-values-tp3230161p3230161.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list