inst/tinytest/test-dots.R

source("helpers.R")
using("marginaleffects")

requiet("lme4")

# lme4::lmer
mod <-lme4::lmer(mpg ~ hp + (1 | gear), data = mtcars)
expect_inherits(slopes(mod), "marginaleffects")
expect_warning(slopes(mod, blah = 2), pattern = "Github")


# stats::lm
mod <- lm(mpg ~ hp, data = mtcars)
expect_inherits(slopes(mod), "marginaleffects")
expect_warning(slopes(mod, blah = 2), pattern = "Github")



rm(list = ls())

Try the marginaleffects package in your browser

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

marginaleffects documentation built on Oct. 20, 2023, 1:07 a.m.