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

From: Warnes, Gregory R <gregory.r.warnes_at_pfizer.com>
Date: Tue 25 Oct 2005 - 23:32:19 EST

If you are interested in trimming leading and trailing whitespace (and not interior whitespace), you can use the 'trim' function from the 'gdata' package.

-G

> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch]On Behalf Of roger bos
> Sent: Tuesday, October 25, 2005 8:52 AM
> To: (r-help@stat.math.ethz.ch.)
> Subject: [R] Can anyone please tell me how to strip the white spaces
> from a character vector?
>
>
> 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
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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
>
>



LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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 Wed Oct 26 00:24:01 2005

This archive was generated by hypermail 2.1.8 : Wed 26 Oct 2005 - 03:12:32 EST