https://github.com/cran/MuMIn
Raw File
Tip revision: 24dee7a22a11c56a96d66345d9b41d48bee32d0f authored by Kamil BartoĊ„ on 23 September 2011, 12:18:05 UTC
version 1.3.10
Tip revision: 24dee7a
get.models.R
`get.models` <-
function(dd, subset = delta <= 4, ...) {

	#subset <- if (missing(subset)) quote() else substitute(subset)
	subset <- eval(substitute(subset), envir = dd, enclos = parent.frame())
	gmod <- attr(dd, "global")
	calls <- attr(dd, "calls")[subset]

	arg <- list(substitute(gmod), NA, ...)
	env <- attr(tryCatch(terms(gmod), error=function(...) terms(formula(gmod))),".Environment")

	models <- lapply(calls, eval, envir=env)

	attr(models, "rank.call") <- attr(dd, "rank.call")
	attr(models, "rank") <- attr(dd, "rank")

	return(models)
}
back to top