[R] Zero Index Origin?

Bob Cain arcane at arcanemethods.com
Thu Apr 1 00:00:50 CEST 2004


Thanks for the input.  I'm new to classes and object
orientation as well as to R and was sorta hoping to hear
that a solution might exist within that structure.  Would
existing functions be able to deal with such objects and see
them as the 1 origin objects that they expect?

A solution to backward compatibility that I proposed to the
Matlab group, which was never shot down from a technical
standpoint, but which in the end we could not get them to
consider, was to make the origin a contextual variable which
could be set by the programmer to whatever he wanted, ala
APL.  To deal with existing functions, it was made local in
scope and always initialized to 1 when a function was
called.  I'm not yet sure that this simple approach is even
meaningful much less inclusive in the context of R but I'd
like to invite comment.

I fully understand the potentially large scope of such a
proposed change to the implementation but right now I'm just
curious about the theoretical possibility.

I don't really wish to go into all of the reasoning why this
convenience is important to DSP applications.  Let me just
say that it has been the subject of considerable discussion
WRT Matlab and a rather large number of reasons for its
desirability have been put forth from that community.  I'd
like to promote R in the various usenet and email groups
that are involved in DSP type programming, even to the point
of recruiting an R-DSP working group, and to be able to
point to this capability would be a strong selling point.


Bob
-- 

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

                                              A. Einstein




More information about the R-help mailing list