Skip to content
Prev 18129 / 63424 Next

[ subscripting sometimes loses names (PR#8192)

On Wed, Oct 19, 2005 at 02:33:50PM +0200, Martin Maechler wrote:

            
My patch includes the function dtk.test.brace.names() which
demonstrates the problem.  If you source just that function into a
completely stock R, you can see the losing names problem by running:

  dtk.test.brace.names(return.results.p=T ,only="all")

To make it easier to see just what the problem is, I'll send example
output in my next email.
No, I don't think that.  If comments in my code give that impression
then that's a bug in my comments, it was not my intention.

My coworkers and I originally fixed the name losing problem in S-Plus,
then later did so in R, so in some places I might have sloppily said,
"R is different than S-Plus" when what I REALLY meant was, "Stock R is
different than our fixed/patched S-Plus where we've already solved
these name-losing problems."

Stock S-Plus and R both suffer from losing names when they shouldn't.
Since I use both dialects, I've included (ugly) fixes for both.  Of
course you probably only care about the R part, but I didn't think it
would hurt to include both.
Yes, I'm aware of that FAQ.  I also just finished porting a large body
of code from S-Plus to R a few months ago, so I have a very concrete
appreciation of the MANY little S-Plus vs. R differences, many more
than are mentioned in that FAQ.

Some of those differences are simply arbitrary or accidental, but
others are places where S-Plus was basically doing something dumb and
the R behavior is better.  I have no complaints about this.  :)

(The converse, where R's behavior is definitely inferior to that of
S-Plus, seems to be a lot less common, and are usually more minor.)