tests/testthat/test-check_vars.R

skip_on_os(c("mac", "solaris"))

test_that("check vars", {
  data(iris)
  m_check <- lm(Sepal.Width ~ Sepal.Length + Species, data = iris)
  expect_error(
    ggpredict(m_check, terms = "Specis"),
    regex = "\"Species\""
  )
  m_check <- lm(Sepal.Width ~ Sepal.Length + Species, data = iris)
  expect_error(
    ggpredict(m_check, terms = c("Sepal.Lenght", "Specis")),
    regex = "\"Sepal.Length\", \"Species\""
  )
})

Try the ggeffects package in your browser

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

ggeffects documentation built on Sept. 12, 2024, 7:41 a.m.