Use R user defined function in C -


I am trying to extend an R package which is completely written in C. I have the following problem : In C code I want to call a R user for defined function, as is the routine adjustment. However, when I try to find out the main steps in optimization, I am able to follow the steps given in the source code, but as soon as I try to understand how R Is known. External2) I can not even understand what is the link between the arguments passed. Specifically, we have the following in src / library / stats / src / optim.c

  SEXP optim (SEXP call, SEXP op, SEXP args, SEXP We have such a (which I think) hope that it is in this way  
  .External2 (C_optim, par, fn1, gr1, method, choice, lower, upper)  

How logic calls, sessions, args And some years favorable to RO, I had read something like this in order to call Arcal or Function in C. I remember that at the time even this function was disliked, but it is just to clarify what I want.


Comments