[R] Zero Index Origin?

Bob Cain arcane at arcanemethods.com
Thu Apr 1 04:31:01 CEST 2004

Peter Dalgaard wrote:

> I think it was said quite early in the thread, but since noone
> apparently listened, let me reiterate: One of the powerful indexing
> features in R is the negative index ("all, except") and x[-0] would
> lead to some complications if 0 was a true index. 

Interesting.  The kind of gotcha I hoped wouldn't exist. 

I've thought of another one.  Legacy functions that accept 
indices as arguments from a 0-origin caller.


"Things should be described as simply as possible, but no 

                                              A. Einstein

More information about the R-help mailing list