[R] Is it possible to get the first letter of a word?

Uwe Ligges ligges at statistik.uni-dortmund.de
Wed Jun 22 16:52:01 CEST 2005


Navarre Sabine wrote:

> Hi,
> I would to get the first letter of a word like:
> 
> 
>>title_cat
> 
>        TitleCat
> 1     Training
>  
> I would like T from Training!
> 
> Thnaks a lot for your help
>


substr(title_cat,1,1)

Uwe Ligges

> Sabine
> 
> 		
> ---------------------------------
> 
>  Téléchargez le ici !  
> 	[[alternative HTML version deleted]]
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list