Re: [R] Calling optim and .C

2008-11-06 Thread Armin Meier
Thanks, your answer just helped me to find the error. Armin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

[R] Calling optim and .C

2008-11-05 Thread Armin Meier
Hi all, I want to optimize a function fn using optim. This function fn calls the .C function in it with a function name and arguments given to fn, i.e. something like this pseudocode: fn - function(par, some params for fn) {... .C(Cfunction, ...) ...} optim(par, fn, some params for fn) In my

Re: [R] Calling optim and .C

2008-11-05 Thread Rolf Turner
On 6/11/2008, at 11:39 AM, Armin Meier wrote: Hi all, I want to optimize a function fn using optim. This function fn calls the .C function in it with a function name and arguments given to fn, i.e. something like this pseudocode: fn - function(par, some params for fn) {... .C (Cfunction,