[R] Truncation of text strings

Göran Broström gb at stat.umu.se
Wed May 21 12:11:45 CEST 2003


On Wed, 21 May 2003, Uwe Ligges wrote:

> Göran Broström wrote:
> > How do I print text strings to a given length, ie, if they are too long
> > I want them truncated (from the end)?
> > 
> > 
> >>format.char("123", width = 1)
> > 
> > 
> > does not do what I want, ie, "1".
> > 
> > ---
> >  Göran Broström                    tel: +46 90 786 5223
> >  Department of Statistics          fax: +46 90 786 6614
> >  Umeå University                   http://www.stat.umu.se/egna/gb/
> >  SE-90187 Umeå, Sweden             e-mail: gb at stat.umu.se
> > 
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 
> 
> See ?substring

Oh yes, thanks to all who responded!

Göran




More information about the R-help mailing list