[R] trim a string
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Jun 17 20:47:37 CEST 2005
Better code for this purpose is in example(grep).
`white space' and `a blank' are not necessarily the same thing.
On Fri, 17 Jun 2005, Liaw, Andy wrote:
> http://finzi.psych.upenn.edu/R/Rhelp02a/archive/14493.html
>
> Andy
>
>> From: Omar Lakkis
>>
>> How to trim the leading and trailing white space off of a string?
>>
>> If the variable is " E " I need to convert it to "E".
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list