From ripley at stats.ox.ac.uk  Sat Oct 18 17:05:36 2003
From: ripley at stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Sat Oct 18 17:04:57 2003
Subject: [Rd] Recursive indexing can cause R-1.8.0 (and R-1.7.1) to
	(PR#4647)
Message-ID: <200310181505.h9IF5a0P025820@pubhealth.ku.dk>



On Thu, 9 Oct 2003 anaximander@gmx.de wrote:

> Recursive indexing can cause R-1.8.0 (and R-1.7.1) to segment fault
> 
> First of all, many thanks to the R team!!
> R is really a software for everyday work.
> Yes, I've found a fault, but I hope it's not just faultfinding ;-)
> 
> In the NEWS file of R-1.8.0, first printed in R NEWS 1.7.1,
> there was given a promise: [ 1 ]
>   o       Recursive indexing of lists is allowed, so x[[c(4,2)]] is
>           shorthand for x[[4]][[2]] etc.  (Wishlist PR#1588)
> 
> That's not fulfilled in all cases, although there was already a
> code correction in R-1.8.0: [ 2 ]
>    o       Recursive indexing of lists had too little error-checking.
>            (related to PR#3324)

That's not a code correction, that's catching unanticipated user errors.

This report is also user error which is not always caught.

However, please don't say that something has `not been fulfilled' when
it works exactly as documented but punishes misuse too severely.
It really is hard to anticipate just how silly users can be.

> Of coarse, R is not intended to be an ingenious data base program,
> which should be able to handle, let's say, complicated requests 
> like they are possible in SQL-language.
> 
> On the other side, lists are becoming more and more important in R,
> so there *should* be a convenient way to deal with nested lists, shan't it?
> Sure, all of us can avoid such lists in our own data, but we often
> have to use data files from other people with *have* a nested structure.
> (Thats the way I discovered this error.)

> Perhaps we can find a fair compromise?

Yes, would you please not making sweeping statements about R's abilities 
based on its not failing to cope with your own particular errors?
It did report a correct error message at least once!

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] Recursive indexing can cause R-1.8.0 (and R-1.7.1) to (PR#4647)
ripley@stats.ox.ac.uk