Hello all,

I would like to get a substring (first few characters till ~) from a string

I can think of way of doing so by

> string<-'yab~a+b+c'
> x<-substring(string,1,3)
> x
[1] "yab"

But if I do not know the length of the first word before ~ sign, how can I get it out from the whole string?

Thanks,

Rebecca

----------------------------------------------------------------------
This message, and any attachments, is for the intended r...{{dropped:5}}

