[R] position of a specific character

Hua Li hualihua at yahoo.com
Tue Jul 15 00:57:36 CEST 2008


Hi All,

I'm wondering whether there is a quick way to know the position of a specific charcater in a long character:

for example

frg="((D:41.04,I:41.04):45.05,(((E:2.32,((G:0.67,J:0.67):0.44,H:1.11):1.21)"

and I would like to know that the 1st, 2nd, 26th, 27th, 28th ... character is "(", is there a quick way to do that?

Thanks!

Hua



More information about the R-help mailing list