[R] Remove all whitespaces
Ivan Calandra
ivan.calandra at uni-hamburg.de
Thu May 5 11:02:59 CEST 2011
Hi Joel,
Try this:
x <- "1 2 3 4 5 6 7 8 9 "
gsub(" ", "", x)
Ivan
Le 5/5/2011 10:50, Joel a écrit :
> Hi
>
> I got a string that looks something like this
>
> 1 2 3 4 5 6 7 8 9 ...
>
> and I want it to be
>
> 123456789...
>
> So I want to remove all spaces (or whitespaces) from my string.
>
> Anyone know a good way of doing this?
>
> //Joel
>
--
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra at uni-hamburg.de
**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/1525_8_1.php
More information about the R-help
mailing list