[R] 'R CMD check' fails with "evaluation nested too deeply: infinite recursion"

Uwe Ligges ligges at statistik.tu-dortmund.de
Fri Nov 13 20:00:52 CET 2009


[Going through some old and from what I see unanswered messages

No, you cannot have a cycle in Imports / Depends / LinkingTo
otherwise you will run into an "the chicken or the egg" problem:
That declaration means that the other packages must be loadable on 
installation, for example.

You can try to declare "Depends" in one and to use "Suggests" in the one 
with less strong dependencies. If the dependency is too strong: Why not 
merge these essential parts of the functionality that depend on each 
other into one package?

Best wishes,
Uwe Ligges




Joerg van den Hoff wrote:
> I get the error
> 
> Error : evaluation nested too deeply: infinite recursion / options(expressions=)?
> 
> during a 'R CMD check ...'
> 
> on one of my packages. The reason seems to be that this package is
> mutually dependent on another one (i.e. the DESCRIPTION files of package
> A lists package B under "Depends" and vice versa). this might be bad
> design (having bits in both packages needed by the other), but I believe
> prior to R 2.9. this did not cause trouble. now the log file of the
> 'check' is something like
> 
> 
> 
> Installing *source* package 'roiutils' ...
> ** R
> ** exec
> ** preparing package for lazy loading
> Loading required package: roiutils
> Loading required package: fzrutils
> =======================CUT (many more of the same) ========================
> Loading required package: roiutils
> Loading required package: fzrutils
> Loading required package: roiutils
> Error : evaluation nested too deeply: infinite recursion / options(expressions=)?
> 
> 
> 
> 
> i.e. it seems that R loads both packages again and again.
> 
> what am I missing/doing wrong?
> 
> thanks in advance
> 
> joerg
> 
> PS:
> 
> platform       powerpc-apple-darwin8.11.1  
> arch           powerpc                     
> os             darwin8.11.1                
> system         powerpc, darwin8.11.1       
> status                                     
> major          2                           
> minor          9.2                         
> year           2009                        
> month          08                          
> day            24                          
> svn rev        49384                       
> language       R                           
> version.string R version 2.9.2 (2009-08-24)
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list