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
On 10/25/05 8:51 AM, roger bos [EMAIL PROTECTED] 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]]
Quoting roger bos [EMAIL PROTECTED]:
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]]
On Tue, 2005-10-25 at 08:51 -0400, roger bos 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
Roger,
See the next to last set of examples in ?sub.
a -
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 :
Thanks to everyone for the gsub function. The white spaces were generated by
reading in the file, but its a fixed width file and I only need some of the
columns, so this was the easiest way to do it.
Thanks,
Roger
On 10/25/05, Marc Schwartz [EMAIL PROTECTED] wrote:
On Tue, 2005-10-25 at
Try trim() in gdata package.
Wuming
On 10/25/05, roger bos [EMAIL PROTECTED] 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
roger bos 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?
Not beeing an expert for regular expressions, I'd try
sub( *$, , sub(^ *, , a$tic))
to strip from beginnings