search for: ugly_function

Displaying 1 result from an estimated 1 matches for "ugly_function".

2012 Sep 06
2
choose() function returning anomalous results (zero instead of one)
...2 2 2 2 2 3 3 3 3 3 3 3 Browse[1]> Q1 [1] 3 Browse[1]> choose(Q1,nn) [1] 1 1 1 1 1 1 1 1 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 0 0 0 0 0 -------------- The first was from RStudio, the second from RGui. (Windows x64, version 2.14.2). (That's executed from the point of view of browser() in ugly_function(), see code below). It's returning choose(3,3) as 0, instead of 1. It does not do this consistently - I've put the simplest code I've been able to use to consistently generate the problem beneath my sig. Something about the loop seems to generate the problem. If I remove the loop over...