Re: [R] Splitting strings

2007-08-23 Thread Gabor Grothendieck
This applies the indicated perl-style regular expression where the first backreference (\\D+) is the non-digits and the second backreference (\\d+) is the digits. The two backreferences, but not the entire matched pattern itself, are passed as arguments x and y to the function whose body is the ri

Re: [R] Splitting strings

2007-08-23 Thread Dimitris Rizopoulos
ty of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http://med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm - Original Message - From: "Gary Collins" <[EMAIL PROTECTED]> To: Sent: T

[R] Splitting strings

2007-08-23 Thread Gary Collins
I'm having a Thursday morning mental block, any suggestions on the following would be most appreciated... I have (as an example) surgery = c("d48", "d67", "dnc37", "a75", "d10", "a78", "d31", "d55", "d1") before each number part the possibilities are c("a", "d", "dnc"), I'm trying to spli