[R] Function to eliminate blank space within strings?

Romain Francois romain.francois at dbmail.com
Fri Jul 3 12:46:30 CEST 2009


On 07/03/2009 10:34 AM, Agustin Lobo wrote:
>
> Is there an specific function
> to eliminate blank space within
> strings?
> Thanks

gsub( "[[:space:]]+", "", string )

-- 
Romain Francois
Independent R Consultant
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/qJ8V : RGG#153: stars network
|- http://tr.im/qzSl : using ImageJ from R: the RImageJ package
`- http://tr.im/qzSJ : with semantics for java objects in rJava




More information about the R-help mailing list