tests/testthat/test-secondary_plot.R

context("secondary_plot")

test_that("base function works", {
  g = secondary_plot(mtcars, "cyl", "mpg", "hp")
  expect_equal(dim(g$data), c(3, 3))

  g = secondary_plot(mtcars, "as.character(cyl)", "mpg", "hp")
  expect_equal(dim(g$data), c(3, 4))

})

Try the ezplot package in your browser

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

ezplot documentation built on Nov. 26, 2023, 5:07 p.m.