context("Test Normal backend")
dx <- 100
dy <- 50
n <- 100
set.seed(123456)
test_that("Check gives same value as cbce", {
if(!requireNamespace("cbce", quietly = TRUE)) {
skip("CBCE not installed")
}
X <- matrix(rnorm(dx*n), ncol=dx)
Y <- matrix(rnorm(dy*n), ncol=dy)
br <- cbce::backend.normal(X, Y)
bc <- new(BackendNormal, X, Y)
expect_equal(cbce::pvals(br, 1:dx), bc$pvals(1:dx, TRUE))
X <- matrix(rnorm(dx*n), ncol=dx)
Y <- matrix(rnorm(dy*n), ncol=dy)
Y <- Y + as.vector(X %*% c(rep(1, 100), rep(0, dx-100)))
br <- cbce::backend.normal(X, Y)
bc <- new(BackendNormal, X, Y)
expect_equal(cbce::pvals(br, (1:dy) + dx), bc$pvals((1:dy) + dx, FALSE))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.