tests/testthat/test_best_worst_month.R

context("Test for function 'best_worst_month'")

load("test_best_worst_month.RData")

test_that("best_worst_month function", {
  
  result.1 <- backtestGraphics:::best_worst_month(x)
  
  expect_equal(result.1, truth.1, label = "Failed the test to calculate the best/worst months")
})

Try the backtestGraphics package in your browser

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

backtestGraphics documentation built on May 29, 2017, 3:11 p.m.