Re: [Rd] calling optimize/fmin from C code

2006-12-29 Thread Hin-Tak Leung
To find out what those parameters are, I would suggest "May the Source be with you". What's I like to point out though, is that in R, sometimes it is the loop construct which is slow; and also the slower part may not be where you think it is. I would suggest looking into (1) moving the whole loo

[Rd] calling optimize/fmin from C code

2006-12-28 Thread Tamas K Papp
Hi, To make a calculation (an innermost loop) that uses optimize faster, I think I should write things in C. Is it possible to call fmin, which is called by optimize, from C? It is not listed in Writing R extensions, but I found double Brent_fmin(double ax, double bx, double (*f)(double, void *