[R] How does this function print, why is n1 which equals 1 printed as 2?

2013-02-01 Thread John Sorkin
Windows 7, R 2.12.1 Colleagues, I am trying to understand the n.for.2means function. The code below is a copy of the function (renamed to n.for.2means.js). I have inserted a single line of code towards the bottom of the function which uses the cat function to print the value of n1. You will

Re: [R] How does this function print, why is n1 which equals 1 printed as 2?

2013-02-01 Thread Duncan Murdoch
On 13-02-01 8:47 AM, John Sorkin wrote: Windows 7, R 2.12.1 Colleagues, I am trying to understand the n.for.2means function. The code below is a copy of the function (renamed to n.for.2means.js). I have inserted a single line of code towards the bottom of the function which uses the cat

Re: [R] How does this function print, why is n1 which equals 1 printed as 2?

2013-02-01 Thread David Winsemius
On Feb 1, 2013, at 7:47 AM, John Sorkin wrote: Windows 7, R 2.12.1 Colleagues, I am trying to understand the n.for.2means function. The code below is a copy of the function (renamed to n.for.2means.js). I have inserted a single line of code towards the bottom of the function which uses