Re: [R] exact pattern match in grep for column headers

2010-10-21 Thread 1Rnwb
the current code is like this vidx<-grep(paste('^',vars[vi],'$',sep=''),gsub("[[:punct:]]","",strrl1[[datbeg-1]]),ignore.case=T) where as the old one was vidx<-grep(vars[vi],gsub("[[:punct:]]","",strrl1[[datbeg-1]]),ignore.case=T) -- View this message in context: http://r.789695.n4.nabble.com/

Re: [R] exact pattern match in grep for column headers

2010-10-21 Thread 1Rnwb
Thanks I agree i did not asked the question correctly, but I solved the issue using the suggestions from this post. http://www.mail-archive.com/r-h...@stat.math.ethz.ch/msg23646.html -- View this message in context: http://r.789695.n4.nabble.com/grep-tp3004422p3006236.html Sent from the R help

Re: [R] exact pattern match in grep for column headers

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 12:17 PM, 1Rnwb wrote: my question is exactly as described in this post http://tolstoy.newcastle.edu.au/R/e2/help/07/02/9812.html You are citing a 3 year-old message that had multiple contributors. Either it wasn't answered by Dalgaard or your question is different.

Re: [R] exact pattern match in grep for column headers

2010-10-21 Thread 1Rnwb
my question is exactly as described in this post http://tolstoy.newcastle.edu.au/R/e2/help/07/02/9812.html i am doing the pattern search using a vector 'vars[vi]' where i cannot use '^vars[vi]$' for a exact pattern match -- View this message in context: http://r.789695.n4.nabble.com/grep-tp30044