On 11/19/2008 10:13 AM, megh wrote:
In the optim() function there is a syntax :

res <- .Internal(optim(par, fn1, gr1, method, con, lower,
Here how can I see the inside-codes of ".Internal" function ?


You need the R source code. Then find src/main/names.c, and look up "optim". It will tell you the C name of the function being called.

In this case, for the R-devel version, you'll find this on names.c line 853:

{"optim",     do_optim,       0,      11,     7,      {PP_FUNCALL, PREC_FN,   
0}},

So you need to find the do_optim function.  It's in src/main/optim.c.

You can browse these source files on

https://svn.r-project.org/R/trunk/src/main

Duncan Murdoch

______________________________________________
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, self-contained, reproducible code.

Reply via email to