[R] Regex magic anyone?

Johannes Graumann johannes_graumann at web.de
Fri Jan 18 15:09:14 CET 2008


Hi again,

how to elegantly split

s <- "ABCDEFGT(P)HIJK"

into

"A" "B" "C" "D" "E" "F" "G" "T(P)" "H" "I" "J" "K"

(independently of which letters 'T' or 'P' actually represent ...).

Please jumstart my regexing,

Joh



More information about the R-help mailing list