Re: [R] trim a string

From: Francisco J. Zagmutt <gerifalte28_at_hotmail.com>
Date: Sat 18 Jun 2005 - 04:47:37 EST


RSiteSearch("trim") will give you a lot of answers. You cal also use the higher level function trim{R.oo} i.e.:

library(R.oo)
x=" e "
trim(x)
[1] "e"

>From: Omar Lakkis <uofiowa@gmail.com>
>Reply-To: Omar Lakkis <uofiowa@gmail.com>
>To: r-help@stat.math.ethz.ch
>Subject: [R] trim a string
>Date: Fri, 17 Jun 2005 13:34:36 -0400
>
>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".
>
>______________________________________________
>R-help@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



R-help@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 Received on Sat Jun 18 04:52:59 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:49 EST