Re: [R] Recursion problem

2010-08-22 Thread Shant Ch
Re: [R] Recursion problem We replied once that your function Grx is not correct. It will recurse to an infinite depth because there is no condition to end the calls. I would expect that there would be some test at the beginning of the function to see if it should be called again. You need to de

Re: [R] Recursion problem

2010-08-22 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Shant Ch > Sent: Saturday, August 21, 2010 9:04 PM > To: r-help@r-project.org > Subject: [R] Recursion problem > > > > Hi, > > &g

Re: [R] Recursion problem

2010-08-22 Thread Barry Rowlingson
On Sun, Aug 22, 2010 at 11:19 AM, jim holtman wrote: > We replied once that your function Grx is not correct.  It will > recurse to an infinite depth because there is no condition to end the > calls.  I would expect that there would be some test at the beginning > of the function to see if it shou

Re: [R] Recursion problem

2010-08-22 Thread jim holtman
We replied once that your function Grx is not correct. It will recurse to an infinite depth because there is no condition to end the calls. I would expect that there would be some test at the beginning of the function to see if it should be called again. You need to debug your function, or rewri

[R] Recursion problem

2010-08-21 Thread Shant Ch
Hi, I wanted to compute the value of the function ifn at certain values of n. But I am receiving the following error when I was using the following code(given at the end). Error: evaluation nested too deeply: infinite recursion / options(expressions=)? I feel that since the function Grx is