tests/testthat/test-misc.R

test_that("Miscellaneous functions are working", {
  tdir <- tempdir()

  # Do the tests
  dmat <- cbind(matrix(rnorm(60), nrow=10), 1)
  dmat <- scale_design_mat(dmat)
  testthat::expect_equal(
    max(colMeans(dmat)), 0
  )
  dmat <- validate_design_mat(dmat)
  myhat <- hat_matrix(dmat)
  testthat::expect_equal(
    max(abs(myhat %*% myhat - myhat)), 0
  )

})

Try the fMRItools package in your browser

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

fMRItools documentation built on April 12, 2025, 1:32 a.m.