https://github.com/cran/MuMIn
Tip revision: c8b4ce88e9ef2c3fad8c9f5c436287cfc104f48c authored by Kamil BartoĊ on 22 November 2012, 10:19:05 UTC
version 1.8.0
version 1.8.0
Tip revision: c8b4ce8
oldR.R
# compatibility with older versions of R
if(!("intercept" %in% names(formals(stats::reformulate)))) {
`reformulate` <- function (termlabels, response = NULL, intercept = TRUE) {
ret <- stats::reformulate(termlabels, response = response)
if (!intercept) ret <- update.formula(ret, .~. -1)
attr(ret, ".Environment") <- parent.frame()
ret
}
}
if (!exists("nobs", mode = "function", where = "package:stats", inherits = FALSE)) {
`nobs` <- function(object, ...) UseMethod("nobs")
`nobs.default` <- function(object, ...) NROW(resid(object, ...))
`nobs.glm` <- function (object, ...) sum(!is.na(object$residuals))
}