I have problems in using substring ( ) function. My question may looked
simple to all of you, since I am new to Splus. I have problems to get back my 2
digits number after did paste ( ) function.
Let say I have 10 numbers.
>a <- as.numeric(paste(y[1],y[10],sep=""))
then I want to separate it back apart;
>as.numeric(substring(a,1,1))
>as.numeric(substring(a,2,2))
[1] 1 <------------ suppose I want '10'
not '1'
I noticed that substring( ) separate one string at a time, how to do if
we want 2 strings as my example above?
Hopefully someone will help to answer my questions.