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))

})
wkostelecki/ezplot documentation built on Feb. 1, 2024, 10:58 p.m.