cat("\nTests for 'SetOptions'")
library(testthat)
optns = list(methodXi = NULL)
test_that("SetOptions test: optns$method = NULL 'IN' for Dense case, 'CE' for Sparse case, 'CE' for other cases with warning", {
expect_equal(SetOptions(list(c(1,3,5), c(2,4)),list(c(1,3,5), c(2,4)), optns)$methodXi, 'CE')
expect_equal(SetOptions(list(c(1:10), c(1:10)),list(c(1:10), c(1:10)), optns)$methodXi, 'IN')
expect_equal(SetOptions(list(c(1:10), c(1:10)),list(c(1:10), c(1:10)), optns)$kernel, 'epan')
expect_equal(SetOptions(list(c(1,2,3,4,5), c(1,2,3,4)),list(c(1,2,3,4,5), c(1,2,3,4)), optns)$methodXi, 'CE')
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.