tests/testthat/test-area_plot.R

context("area_plot")

test_that("area_plot works", {
  g = area_plot(mtcars, "cyl", "1")

  expect_equal(g[["data"]]$x, c(4, 6, 8))
  expect_equal(g[["data"]]$y, c(11, 7, 14))

  g = area_plot(mtcars, "cyl", "1", "am", position = "fill")
  expect_equal(nrow(g$data), 6)

})

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.