我需要找到nlm函數的源代碼。stats包中的nlm函數的源代碼
當我使用
edit(nlm)
下面的代碼出現
function (f, p, ..., hessian = FALSE, typsize = rep(1, length(p)),
fscale = 1, print.level = 0, ndigit = 12, gradtol = 1e-06,
stepmax = max(1000 * sqrt(sum((p/typsize)^2)), 1000), steptol = 1e-06,
iterlim = 100, check.analyticals = TRUE)
{
print.level <- as.integer(print.level)
if (print.level < 0 || print.level > 2)
stop("'print.level' must be in {0,1,2}")
msg <- (1 + c(8, 0, 16))[1 + print.level]
if (!check.analyticals)
msg <- msg + (2 + 4)
.External2(C_nlm, function(x) f(x, ...), p, hessian, typsize,
fscale, msg, ndigit, gradtol, stepmax, steptol, iterlim)
}
現在,當我想看到的是insode C_nlm
我試圖
stats:::C_nlm
和我得到
$name
[1] "nlm"
$address
<pointer: 0x0000000004a83920>
attr(,"class")
[1] "RegisteredNativeSymbol"
$dll
DLL name: stats
Filename: C:/Program Files/R/R-3.1.2/library/stats/libs/x64/stats.dll
Dynamic lookup: FALSE
$numParameters
[1] 11
attr(,"class")
[1] "ExternalRoutine" "NativeSymbolInfo"
經過一些網絡搜索後,我發現我需要在此之後使用grep
。
但我沒有得到如何使用它。 我想這些引用
How to locate code called by .External2()?
How can I view the source code for a function?
誰能告訴我如何進一步進行?
你在什麼操作系統上? – stanekam
@iShouldUseAName Windows 8 – Artiga