tests/testthat/test-roller.R

context("dyRoller")

test_that("roller creation", {
  d <- dygraph(discoveries, main = "Important Discoveries") %>% 
         dyRoller(rollPeriod = 5)
  expect_identical(d$x$attrs$showRoller, TRUE)
  expect_identical(d$x$attrs$rollPeriod, 5)
})

Try the dygraphs package in your browser

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

dygraphs documentation built on May 2, 2019, 3:34 p.m.