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: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of roger bos > Sent: Tuesday, October 25, 2005 8:52 AM > To: ([EMAIL PROTECTED]) > 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