On Thu, 2008-07-17 at 17:56 +0530, Kurapati, Ravichandra (Ravichandra)
wrote:
> Hi
> 
>  
> 
>      String<-"130.5"
> 
>      
> 
>     Df<-Strsplit(".",":",String)
> 
>  
> 
>      Then Df get 
> 
>        "" "" "" ""
> 
>     But I want Df should contains
> 
>  
> 
>    Df
> 
>   "130"
> 
>   "5"
> 
Hi Ravichandra,
Try:

strsplit(String,"[.]")

The period (full stop) has to be marked as literal.

Jim

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to