Re: [R] Regex Question: return digits after particular letters

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 4:21 PM, Ben Ganzfried wrote: > Thank you very much for your help. It saved me a lot of time and it > worked perfectly. I have a quick follow-up as I'm not sure I > understand yet why the code works and where it comes from. > > For example, in: Tstg <- sub(".*T(\\d)N.", "

Re: [R] Regex Question: return digits after particular letters

2011-06-02 Thread Ben Ganzfried
Thank you very much for your help. It saved me a lot of time and it worked perfectly. I have a quick follow-up as I'm not sure I understand yet why the code works and where it comes from. For example, in: Tstg <- sub(".*T(\\d)N.", "\\1", tmp) *How exactly does the substitution operation work?

Re: [R] Regex Question: return digits after particular letters

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 2:54 PM, Ben Ganzfried wrote: Hi, First of all, I would like to introduce myself as I will probably have many questions over the next few weeks and want to thank you guys in advance for your help. I'm a cancer researcher and I need to learn R to complete a few projec