方法一:直接写函数名称,如在R中查看回归分析代码:
lm
直接可以查看到
function (formula, data, subset, weights, na.action, method = "qr",
model = TRUE, x = FALSE, y = FALSE, qr = TRUE, singular.ok = TRUE,
contrasts = NULL, offset, ...)
{
ret.x
ret.y
cl
mf
m
"offset"), names(mf), 0L)
mf
mf$drop.unused.levels
mf[[1L]]
mf
if (method == "model.frame")
return(mf)
else if (method != "qr")
warning(gettextf("method = '%s' is not supported. Using 'qr'",
method), domain = NA)
mt
y
w
if (!is.null(w) && !is.numeric(w))
stop("'weights' must be a numeric vector")
offset
if (!is.null(