Take a look on grep function. On Fri, Jan 21, 2011 at 3:26 PM, poppinkid <j...@bcm.edu> wrote:
> > 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. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.