[R] how to calculate this natural logarithm

zhaoxing731 zhaoxing731 at yahoo.com.cn
Fri Jan 7 17:20:59 CET 2011


Hello

	I want to calculate natural logarithm of sum of combinations as follow: (R code)

	{
		com_sum=choose(2000000,482)*choose(1000000,118)+choose(2000000,483)*choose(1000000,117)+...+choose(2000000,i)*choose(1000000,600-i)+...+choose(2000000,600)*choose(1000000,0)                  #calculate the sum
	   result=log(com_sum)                          	   #calculate the log of the sum
	}

	But every element of the com_sum is Inf, so I can't get the result
	Thank you in advance

	Yours sincerely
 
ZhaoXing
Department of Health Statistics
West China School of Public Health
Sichuan University
No.17 Section 3, South Renmin Road
Chengdu, Sichuan 610041
P.R.China
	
	

__________________________________________________
¸Ï¿ì×¢²áÑÅ»¢³¬´óÈÝÁ¿Ãâ·ÑÓÊÏä?



More information about the R-help mailing list