Re: [Rd] S4 method dispatch sometimes leads to incorrect when object loaded from file?

2015-05-12 Thread Martin Maechler
> Martin Morgan > on Mon, 11 May 2015 10:18:07 -0700 writes: > On 05/10/2015 08:19 AM, Martin Morgan wrote: >> Loading an S4 object from a file without first loading the library sometimes (?, >> the example below and actual example involves a virtual base class and the s

Re: [Rd] Why is the diag function so slow (for extraction)?

2015-05-12 Thread Martin Maechler
> Steve Bronder > on Thu, 7 May 2015 11:49:49 -0400 writes: > Is it possible to replace c() with .subset()? It would be possible, but I think "entirely" wrong. .subset() is documented to be an internal function not to be used "lightly" and more to the point it is documented to

Re: [Rd] S4 method dispatch sometimes leads to incorrect when object loaded from file?

2015-05-12 Thread Martin Morgan
On 05/12/2015 05:31 AM, Martin Maechler wrote: Martin Morgan on Mon, 11 May 2015 10:18:07 -0700 writes: > On 05/10/2015 08:19 AM, Martin Morgan wrote: >> Loading an S4 object from a file without first loading the library sometimes (?, >> the example below and actual exampl

[Rd] Unexpected failure when calling new() with unnamed arg and

2015-05-12 Thread Hervé Pagès
Hi, The man page for new() suggests that if 'a' is an object with slots "slot1" and "slot2" and C is a class that extends the class of 'a', then the 2 following calls should be equivalent: new("C", a, ...) new("C", slot1=a@slot1, slot2=a@slot2, ...) This is generally the case but I just ran

[Rd] WISH: A more informative abor message than "aborting ..."

2015-05-12 Thread Henrik Bengtsson
When R aborts ("core dumps"), it outputs: "aborting ..." This message is rather generic and can be hard to track back to R itself, i.e. it is not always clear whether it is R itself that aborted or some other piece of code that caused the abort/core dump and outputted that message. May I sugge

Re: [Rd] Why is the diag function so slow (for extraction)?

2015-05-12 Thread Henrik Bengtsson
Along Luke's lines, would(n't) it be enough to look for existence of attribute 'class' to decide whether to dispatch or not, i.e. if c() is needed or not? Even without .subset(), there is a remarkable improvement. I think it's worth condition the code on dispatch or not. For example: [HB-X201]{