Nothing
context('functions')
test_that('sar', {
tmp <- sar(event = demo_returns$EON, control = demo_returns$RWE, logret = FALSE)
expect_error(sar(control = demo_returns$RWE, logret = FALSE))
expect_error(sar(event = demo_returns$EON, logret = FALSE))
expect_error(sar(event = demo_returns$EON, control = demo_returns$RWE, logret = "FALSE"))
expect_error(sar(event = c(demo_returns$RWE, 1), control = demo_returns$RWE, logret = FALSE))
expect_equal(dim(tmp),NULL)
expect_equal(class(tmp), c("numeric"))
expect_equal(length(tmp), 760)
expect_equal(mean(tmp), 0.006870196, tolerance=1e-7)
expect_equal(min(tmp), -7.856651, tolerance=1e-7)
expect_equal(max(tmp), 7.109707, tolerance=1e-7)
expect_equal(sd(tmp), 1, tolerance=1e-7)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.