skip_on_os(c("mac", "linux"))
skip_if_not_installed("marginaleffects")
skip_if_not_installed("withr")
withr::with_environment(
new.env(),
test_that("scoping issues", {
data(iris)
model <- lm(Sepal.Width ~ Species, data = iris)
out1 <- estimate_contrasts(model, backend = "marginaleffects")
contrast <- NULL
out2 <- estimate_contrasts(model, backend = "marginaleffects")
expect_equal(out1$Difference, out1$Difference, tolerance = 1e-4)
})
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.