tests/testthat/test-compiler-stat-summary.R

acontext("stat_summary")

test_that("stat_summary does not infinitely recurse", {
  data(UStornadoes, package = "animint2")
  gg <- ggplot()+
    stat_summary(aes(year, year),
                 data=UStornadoes,
                 clickSelects="year", fun.y=length, geom="bar")
  L <- list(bar=gg)
  info <- animint2dir(L, open.browser=FALSE)
  expect_identical(length(info$geoms), 1L)
})

Try the animint2 package in your browser

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

animint2 documentation built on Nov. 22, 2023, 1:07 a.m.