[Rd] data frame subset patch, take 2

Vladimir Dergachev vdergachev at rcgardis.com
Wed Dec 20 00:18:43 CET 2006


On Saturday 16 December 2006 4:41 pm, Martin Maechler wrote:
>
> Correction: the problems show on both platforms;
>
> one is in mgcv, gam(), an error in [[ <-  -- pretty clearly linked to your
> changes but not reproducible when tried isolatedly
> interactively,
>
> the other one is a seg.fault "memory not mapped" when running
> the  example
>
>    > nuke.boot <- boot(nuke.data, nuke.fun, R=999, m=1,
>
>    +      fit.pred=new.fit, x.pred=new.data)
>
>
>     MM> My guess: typically when dealing with model.frames (which
>     MM> internally are "just" data frames with a particular "terms"
> attribute) MM> but the problems are not reproducible when run
> interactively. MM> It may really be that .subset() and .subset2() are
> sometimes MM> used in cases they should not be in your new code; or they
> even have a bug that MM> is not triggered unless by using them in the new
> context of [.data.frame
>
>     MM> So I'm sorry, but we might have to wait for a "take 3"
>     MM> or rather try to find the problem with your patch.
>     MM> Maybe you can try yourself?

Hi Martin, 

   thank you very much for the feedback !

   Of course, there is going to be take 3 :)

   I have reproduced your tests with slightly different results:
boot.Rcheck fails, stats.Rcheck segfaults, cluster.Rcheck fails.

   More importantly I was able to reproduce the problem interactively with 
boot.Rcheck. When interactive I found that the issue has random outcomes - 
sometimes it segfaults and sometimes it produces this:

   1) boot.Rcheck fails with 

> nuke.boot <- boot(nuke.data, nuke.fun, R=999, m=1, 
+      fit.pred=new.fit, x.pred=new.data)
Error: incompatible types (from NULL to list) in [[ assignment
Execution halted

    but does not segfault. Other times it errors out in different places or 
goes through fine. On one occasion I observed a very interesting behaviour - 
the R console looked like it was completely confused about which functions 
are being called and about arguments passed to them.

   After some tinkering, I realized that, perhaps, the problem is with me 
adding .subassign and .subassign2 functions and this somehow interfering with 
saved workspaces. So I did make clean (after updating SVN) and the problem 
appears to be gone.

   Could you try dong make clean && make on your installation and reporting 
the results ?

                              thank you very much !

                                           Vladimir Dergachev



More information about the R-devel mailing list