tests/testthat/test-side_plot.R

context("side_plot")

test_that("side_plot works", {

  g = side_plot(mtcars, "cyl", "carb", reorder = FALSE)

  expect_equal(g[["data"]]$x, factor(c(4, 6, 8), c(8, 6, 4)))
  expect_equal(g[["data"]]$y, c(17, 24, 49))

})

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.