https://github.com/cran/MuMIn
Raw File
Tip revision: a0f20e50f08f1cb37bc636092dfc8f46eb3f0187 authored by Kamil BartoĊ„ on 14 June 2009, 00:00:00 UTC
version 0.12.2
Tip revision: a0f20e5
get.models.R
`get.models` <-
function(dd, subset = delta <= 4, ...) {

	subset <- eval(substitute(subset), envir = dd, enclos = parent.frame())
	gmod <- attr(dd, "global")
	frm <- attr(dd, "formulas")[subset]

	sgmod <- substitute(gmod)
	models <- lapply(frm, function(.x) eval(call("update", sgmod, .x), sys.parent(3)))

	if (!is.null(attr(dd, "rank.call"))) {
  		attr(models, "rank.call") <- attr(dd, "rank.call")
	}

	return(models)
}

back to top