Thanks David and Bill for your answers. It does makes sense. So if I want
to make things neater visually, I have no other option than to post-process
the output I guess?
Thx,
Dominic
2014-05-16 16:58 GMT-04:00 William Dunlap :
> > It seems that when a vector has 10 elements, it prints out diff
Dominic,
Actually it makes perfect sense. When R prints vectors of length less
than 9, it does not ever need to print 2 digits for the index. For lengths
between 10 and 99, it may need to print an index with 2 digits, therefore,
it prints the first index and all single digit indexes with a leadin
> It seems that when a vector has 10 elements, it prints out differently than
> one with 9 (extra space before the opening bracket). I can't see why this
> is happening.
It is happening because the print routine wants to be ready to print
all the line-beginning [index] tags aligned with each other
Consider the following:
> 20:28[1] 20 21 22 23 24 25 26 27 28> 20:29 [1] 20 21 22 23 24 25 26 27 28 29
It seems that when a vector has 10 elements, it prints out differently than
one with 9 (extra space before the opening bracket). I can't see why this
is happening. I am writing a manual contain