Re: [R] rgamma function

2012-07-16 Thread Chandler Zuo
]=rgamma(5000,1); UNPROTECT(1); return (a); } Thanks for your suggestions! On 07/15/12 07:07, peter dalgaard wrote: On Jul 14, 2012, at 04:55 , Chandler Zuo wrote: Hi, Has anyone encountered the problem of rgamma function in C? The following simplified program always dies for me, and I

[R] rgamma function

2012-07-15 Thread Chandler Zuo
Hi, Has anyone encountered the problem of rgamma function in C? The following simplified program always dies for me, and I wonder if anyone can tell me the reason. #include #include #include SEXP generateGamma () { srand(time(NULL)); return (rgamma(5000,1)); } Has anyone encounte