[Rd] strange error with rw2010dev

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Apr 11 09:46:11 CEST 2005


Martin Maechler <maechler at stat.math.ethz.ch> writes:

> >>>>> "Kjetil" == Kjetil Brinchmann Halvorsen <kjetil at acelerate.com>
> >>>>>     on Sun, 10 Apr 2005 14:00:52 -0400 writes:
> 
>     Kjetil> The error reported below still occurs in todays
>     Kjetil> (2005-04-08) rw2010beta, should I file a formal bug
>     Kjetil> report?
> 
> Thank you, Kjetil.
> 
> It seems nobody has found time to look at this in the mean time.
> However,
> I can confirm the bug on quite a different platform
> (Linux Redhat 64-bit on AMD 64).
> The problem is infinite recursion which you see more easily,
> when you set something like options(expressions=500).
> 
> Further note that the bug is not new, it also happens in
> previous versions of R ( -> i.e. no reason to stop using "R 2.1.0 beta"!)
> 
> Here's a ``pure script''
> 
> testmat <- matrix(1:80, 20,4)
> dim(testmat)
> #
> testframe <- data.frame(testmat=I(testmat),
>                         x=rnorm(20), y=rnorm(20), z=sample(1:20))
> str(testframe)
> 
> options(expressions=100)
> summary(testframe)
> ##> Error: evaluation nested too deeply: infinite recursion / options(expression=)?
> ## -- or --
> ##> Error: protect(): protection stack overflow
> 
> 
> ### In the second case, I at least get a useful trace back:
> 
> traceback() ## longish output, shows the infinite recursion:
> 
> ..........................
> ...........................
> 
> 17: summary.data.frame(data.frame(object), ...)
> 16: summary.matrix(object, digits = digits, ...)
> 15: summary.default(X[[1]], ...)
> 14: FUN(X[[1]], ...)
> 13: lapply(as.list(object), summary, maxsum = maxsum, digits = 12, 
>         ...)
> 12: summary.data.frame(data.frame(object), ...)
> 11: summary.matrix(object, digits = digits, ...)
> 10: summary.default(X[[1]], ...)
> 9: FUN(X[[1]], ...)
> 8: lapply(as.list(object), summary, maxsum = maxsum, digits = 12, 
>        ...)
> 7: summary.data.frame(data.frame(object), ...)
> 6: summary.matrix(object, digits = digits, ...)
> 5: summary.default(X[[1]], ...)
> 4: FUN(X[[1]], ...)
> 3: lapply(as.list(object), summary, maxsum = maxsum, digits = 12, 
>        ...)
> 2: summary.data.frame(testframe)
> 1: summary(testframe)
> 
> --------
> 
> Thanks again for the report;
> this should be fixable before release.

Preferably before code freeze! (today)

I think we (Thomas L.?) got it analysed once before: The issue is that
summary.matrix is passing data.frame(object) back to
summary.data.frame without removing the AsIs class.

I don't a simple unclass() will do here. 

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907



More information about the R-devel mailing list