tests/testthat/test-det_AtA.R

context("tests of det in Rcpp")

test_that("tests of det",{
  set.seed(74695464)
  n <- 500
  p <- 50

  X <- matrix(rnorm(n*p), n, p)
  
  det.r <- determinant(crossprod(X))$modulus
  det.c <- det_AtA(X)
  expect_equal(det.r, det.c,  check.attributes=FALSE)
})
jianan/qtlpvl documentation built on May 12, 2021, 5:49 a.m.