Fwd: Re: [Rd] Problem with expression evaluation depth (PR#436)

p.dalgaard@biostat.ku.dk p.dalgaard@biostat.ku.dk
Wed, 16 Feb 2000 16:22:05 +0100 (MET)


Jose Miguel Perez <jperez@cesma.usb.ve> writes:

> I think I found the root of the problem.
> My program throws out some cycles of the loop
> using 'next'.
> The following code shows the behavior of R_EvalDepth in these cases:
> without next:
> > for (i in 1:10 ) {}
> 0
> 1
> 2
> 2
> 1
> 1
> 1
> 1
> 1
> 1
> 1
> 
> with next:
> > for (i in 1:10 ) {next}
> 0
> 1
> 2
> 2
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 11
> 12
> 13
> 14
> 15
> 16
> 17
> 18
> 19
> 20                  

Thanks! [But you forgot to copy r-bugs...]

more succinctly:

> for(i in 1:1000)next
Error: evaluation is nested too deeply: infinite recursion?


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

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._