[R] using grep

kMan kchamberln at gmail.com
Sun Feb 28 22:44:00 CET 2010

Then use strsplit() instead.

-----Original Message-----
From: kayj [mailto:kjaja27 at yahoo.com] 
Sent: Friday, February 26, 2010 1:02 PM
To: r-help at r-project.org
Subject: Re: [R] using grep

Hi ,

I have tried

gsub(".*York(\\d+).*", "\\1", grep("New York", x, value = TRUE)) 

and outputs 

 "P New York722AZ" "K New York20" 
but that is not what i want, I want the output to be 


View this message in context:
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list