tests/testthat/test-theme_publish.R

library(ggplot2)

p <- ggplot(mtcars) +
  geom_point(aes(x = wt, y = mpg,
                 colour = factor(gear))) + facet_wrap( ~ am)

test_that("Plotting works without warnings", {
  expect_silent(print(p))
  expect_silent(print(p + theme_publish()))
})

Try the envalysis package in your browser

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

envalysis documentation built on Sept. 20, 2023, 5:07 p.m.