tests/testthat/test-print_subsets.R

skip_on_os(c("mac", "linux", "solaris"))
skip_if_not_installed("datawizard")

test_that("print subsetting 1", {
  m <- lm(mpg ~ gear * factor(cyl), mtcars)
  gge <- ggpredict(m, c("gear", "cyl"))
  expect_snapshot(print(gge[c(1:2, 4:6)]))
})
test_that("print subsetting 1", {
  m <- lm(mpg ~ factor(cyl), mtcars)
  gge <- ggpredict(m, "cyl")
  expect_snapshot(print(gge[c(1:2, 4:6)]))
})

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.