inst/tinytest/test_plots.R

# plot is created without error
x = lm(wt ~ mpg, data = mtcars)
y = lm(wt ~ disp, data = mtcars)

if (requireNamespace("ggplot2", quietly = TRUE)) {
  plot = estimate_plot(list(x, y), c("x", "y"))

  expect_true("ggplot" %in% class(plot), info = "Expect ggplot class")
}
lukehannan/lumisc documentation built on May 9, 2022, 12:59 p.m.