[R] Confusion using functions to access the function call stack example section

2007-09-04 Thread Leeds, Mark \(IED\)
I was going through the example below which is taken from the example section in the R documentation for accessing the function call stack. I am confused and I have 3 questions that I was hoping someone could answer. 1) why is y equal to zero even though the call was done with gg(3) 2) what does

Re: [R] Confusion using functions to access the function call stack example section

2007-09-04 Thread jim holtman
It is because you have a recursive function call and the value of 'y' when you print is it 0. I have added another statement that might help clarify what you are seeing. At the point at which the most current value of the function 'ggg' is evaluated (last call), the value of 'y' is zero and you

Re: [R] Confusion using functions to access the function call stack example section

2007-09-04 Thread Peter Dalgaard
Leeds, Mark (IED) wrote: I was going through the example below which is taken from the example section in the R documentation for accessing the function call stack. I am confused and I have 3 questions that I was hoping someone could answer. 1) why is y equal to zero even though the call was

Re: [R] Confusion using functions to access the function call stack example section

2007-09-04 Thread Leeds, Mark \(IED\)
To: Leeds, Mark (IED) Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Confusion using functions to access the function call stack example section It is because you have a recursive function call and the value of 'y' when you print is it 0. I have added another statement that might help clarify what you