[R] About 'choose' function
Duncan Murdoch
murdoch at stats.uwo.ca
Mon Nov 8 19:51:06 CET 2004
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.
Duncan Murdoch
More information about the R-help
mailing list