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 at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of roger bos Sent: Tuesday, October 25, 2005 8:52 AM To: (r-help at 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 at 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}}