R/lmerTest_utils.R

Defines functions lmerTest_summary

## Minimized version of the helper function provided by lmerTest authors.
lmerTest_summary <- function(object, ...) {
    if (requireNamespace("lmerTest", quietly = TRUE)) {
        if (inherits(object, "lmerModLmerTest")) {
            ## lmerTest object
            return(summary(object, ...))
        } else {
            ## lme4 object
            return(summary(lmerTest::as_lmerModLmerTest(object), ...))
        }
        ## *merModLmerTest objects and/or 'lmerTest' is not available
        return(summary(object, ...))
    } else {
        stop("ShowRegTable: Please install the package \"lmerTest\":\n install.package('lmerTest')", call. = F)
    }
}

Try the tableone package in your browser

Any scripts or data that you put into this service are public.

tableone documentation built on April 15, 2022, 5:06 p.m.