[R] About 'choose' function

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Mon Nov 8 20:10:55 CET 2004

On 08-Nov-04 Duncan Murdoch wrote:
> On Mon, 08 Nov 2004 15:56:49 -0000 (GMT), (Ted Harding)
> <Ted.Harding at nessie.mcc.ac.uk> wrote :
>>Further investigation indicates that there is an integer truncation
>>problem with 'choose':
>>  > print(choose(60000000000,1),digits=20)
>>  [1] 60001679906.00000
>>  > print(my.choose3(60000000000,1),digits=20)
>>  [1] 6e+10
> Are you sure you're using the standard R choose()?  I get different
> results from you:
>> print(choose(60000000000,1),digits=20)
> [1] 6e+10
> What platform are you using?  I did this is Windows R 2.0.0, and get
> the same result in the beta of 2.0.1.

Well, that's good to learn! As usual, I'm out of date, but this
time it seems to matter:

  R-1.8.0 on Linux

(Yes, it was the standard R choose() from that version).

Perhaps I'd better roll up my sleeves and finally upgrade (though
I'm really waiting for the next release since the move to 2.0 seems
to have needed a few things ironed out).

Thanks for the cross-check, Duncan.
Best wishes,

E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861  [NB: New number!]
Date: 08-Nov-04                                       Time: 19:10:55
------------------------------ XFMail ------------------------------

More information about the R-help mailing list