On Mon, Feb 7, 2011 at 9:37 AM, Roy Mathew wrote:
> Dear R Users,
>
> if I have a string as follows
> x<-"jsda23tth"
>
> How can I extract out 23 as a numeral?
> I found
> substr(x,5,6)
> but, this doesnt work if the number of alphabets differ.
>
> This is another example where the numbers need to
Dear R Users,
if I have a string as follows
x<-"jsda23tth"
How can I extract out 23 as a numeral?
I found
substr(x,5,6)
but, this doesnt work if the number of alphabets differ.
This is another example where the numbers need to be extracted.
x<-c("jsda23tth","fgd54fgd","j3ngh","gfdjh564")
any id
2 matches
Mail list logo