tests/testthat/test-cbar.R

context("cbar")

test_that("cbar", {
  .data <- iris[, 1:4]
  datetime <- seq(from = Sys.time(), length.out = nrow(.data), by = "mins")
  .data <- cbind(datetime = datetime, .data)

  pre_period <- 1:100
  post_period <- 101:150
  res <- cbar(.data, pre_period, post_period)
  expect_true(inherits(res, "cbar"))

  res <- cbar(.data, pre_period, post_period, apply_standardized = F)
  expect_true(inherits(res, "cbar"))
})

Try the cbar package in your browser

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

cbar documentation built on May 2, 2019, 1:27 p.m.