tests/testthat/test-matrices.R

set.seed(4901)
x <- rnorm(8)

test_that("fastHadamard() is equivalent to multiplication by design matrix",
  {
    expect_equal(c(designMatrix(3) %*% x), fastHadamard(x))
  })

Try the rje package in your browser

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

rje documentation built on Nov. 12, 2022, 9:06 a.m.