Re: [R] Can anyone please tell me how to strip the white spaces from a character vector?

From: Romain Francois <francoisromain_at_free.fr>
Date: Tue 25 Oct 2005 - 23:09:59 EST

Le 25.10.2005 14:51, roger bos a écrit :

>for example:
>
>
>>a$tic[1:10]
>>
>>
>[1] "AIR " "ABCB " "ABXA " "ACMR " "ADCT " "ADEX "
>[7] "ABM " "AFCE " "AG " "ATG "
> Can anyone please tell me how to strip the white spaces from a$tic?
> Thanks,
> Roger
>
>
gsub(' ','',a$tic)

-- 
visit the R Graph Gallery : http://addictedtor.free.fr/graphiques
+---------------------------------------------------------------+
| Romain FRANCOIS - http://francoisromain.free.fr               |
| Doctorant INRIA Futurs / EDF                                  |
+---------------------------------------------------------------+

______________________________________________
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 Tue Oct 25 23:45:49 2005

This archive was generated by hypermail 2.1.8 : Wed 26 Oct 2005 - 00:12:47 EST