Re: [R] how to calculate this natural logarithm

2011-01-11 Thread Mike Marchywka
> Date: Sun, 9 Jan 2011 12:57:49 + > From: c...@witthoft.com > To: r-help@r-project.org > Subject: Re: [R] how to calculate this natural logarithm > > > > You could re-do part of your code to run with mpfr-class variables, and use > this function: > # mpfr choo

Re: [R] how to calculate this natural logarithm

2011-01-09 Thread cgw
You could re-do part of your code to run with mpfr-class variables, and use this function: # mpfr choose(n,k) rmpfac<-function(n,k,prec=50) factorial(mpfr(n,prec))/factorial(mpfr(k,prec))/factorial(mpfr(n-k,prec)) Converting into and out of mpfr may not be worth it, but you wi

Re: [R] how to calculate this natural logarithm

2011-01-08 Thread Petr Savicky
On Sat, Jan 08, 2011 at 12:20:59AM +0800, zhaoxing731 wrote: > Hello > > I want to calculate natural logarithm of sum of combinations as follow: > (R code) > > { > > com_sum=choose(200,482)*choose(100,118)+choose(200,483)*choose(100,117)+...+choose(2000

Re: [R] how to calculate this natural logarithm

2011-01-07 Thread Petr Savicky
On Sat, Jan 08, 2011 at 12:20:59AM +0800, zhaoxing731 wrote: > Hello > > I want to calculate natural logarithm of sum of combinations as follow: > (R code) > > { > > com_sum=choose(200,482)*choose(100,118)+choose(200,483)*choose(100,117)+...+choose(2000

Re: [R] how to calculate this natural logarithm

2011-01-07 Thread Ted Harding
On 07-Jan-11 16:20:59, zhaoxing731 wrote: > Hello > I want to calculate natural logarithm of sum of combinations > as follow: (R code) {com_sum=choose(200,482)*choose(100,118)+ choose(200,483)*choose(100,117)+...+ choose(200,i)*choose(100,600-i)+...+ choose(200,600)*

[R] how to calculate this natural logarithm

2011-01-07 Thread zhaoxing731
Hello I want to calculate natural logarithm of sum of combinations as follow: (R code) { com_sum=choose(200,482)*choose(100,118)+choose(200,483)*choose(100,117)+...+choose(200,i)*choose(100,600-i)+...+choose(200,600)*choose(100,0)