Dear R guru:

 

If I got a variable 

aaa<- "up.6.11(16)"

 

how can I extract 16 out of the bracket?

I could use substr, e.g.

substr(aaa, start=1, stop=2)

[1] "up"

 

But it needs start and stop, what if my start or stop is not fixed, I
just want the number inside the bracket, how can I achieve this?

 

Many thanks

 

yan


**********************************************************************
This email and any files transmitted with it are confide...{{dropped:10}}

