Message-ID: <BF83A552.11B02%sdavis2@mail.nih.gov>
Date: 2005-10-25T13:03:14Z
From: Sean Davis
Subject: Can anyone please tell me how to strip the white spaces from a character vector?
In-Reply-To: <1db726800510250551q1878866dt2c0111238a796b0b@mail.gmail.com>
On 10/25/05 8:51 AM, "roger bos" <roger.bos at gmail.com> wrote:
> 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
>
See ?gsub.
gsub(' ','',a$tic)
Sean