[R] spliting a string

Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Thu Jul 17 14:48:34 CEST 2008


haven't even peeked into the docs, have you?

try:
strsplit(String, ".", fixed=TRUE)
strsplit(String, "[.]")

vQ


Kurapati, Ravichandra (Ravichandra) wrote:
> Hi
>
>  
>
>      String<-"130.5"
>
>      
>
>     Df<-Strsplit(".",":",String)
>
>  
>
>      Then Df get 
>
>        "" "" "" ""
>
>     But I want Df should contains
>
>  
>
>    Df
>
>   "130"
>
>   "5"
>
>  
>
>  If any body knows how to do it.tel me
>
> Thanks
>
> K.Ravichandra
>
>  
>
>  
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list