tests/testthat/test-list_kern_to_matrices.R

test_that("list_kern_to_cov() and list_kern_to_inv() are inverse of the other", {
  db <- simu_db(M = 2, N = 3)
  hp <- hp("SE", unique(db$ID))

  list_cov <- list_kern_to_cov(db, "SE", hp)
  list_inv <- list_kern_to_inv(db, "SE", hp, pen_diag = 0)
  for (i in unique(db$ID)) {
    list_cov[[i]] %>% expect_equal(list_inv[[i]] %>% solve())
  }
})

Try the MagmaClustR package in your browser

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

MagmaClustR documentation built on June 29, 2024, 1:06 a.m.